Basic OOP
Implementing a Class
Public & Private Interface
Data Members & Member Functions
Constructors
100

What OOP stands for

What is Object-Oriented-Programming?

100

A user-defined data type

What is a class?

100

This part of a class consists of all member functions that a user may want to apply to their objects

What is a Public Interface?

100

A variable declared inside the class

What is a data member?

100

A set of default information for a variable of a class.

What is a constructor?

200

The technique of hiding the data and functions that operate on class members.

What is encapsulation?

200

When the member function should not change the object, you would use this keyword

What is const?

200

T/F

Data members can be public

FALSE

Data members should NEVER BE PUBLIC

200

This type of notation is used to call member functions

What is dot notation?

200

This has the same name as the class it is a part of

What is the name of a constructor?

300

"Accelerate" could be this in a "car" class

What is a member function?

300

What is used for an object to stores its state

What is a data member?

300

Protects the data members and encapsulates them.

Why should data members be private?
300

An operator used for implementing a member function outside the class.

What is the :: operator?

300

T/F

A class can have multiple constructors

TRUE

A class can have multiple constructors!

400

As a project gets larger, the functions are harder to maintain.

What is the reason for creating OOP?

400

Write the first line of class definition for a "dog" class.

What is...

class dog{

400

This part of a class consists of all member functions that a user may want to apply to their objects

What is a public interface?
400

Give an example of an "iphone" variable within the "phone" class calling an "open_app" member function

What is...

iphone.open_app()

400

T/F

Constructors are void functions because they don't return anything.

FALSE

Although constructors don't return anything, they are NOT void functions!

500

EXACTLY how an object is implemented

Trick question; we don't need to know exactly how it is implemented

500

When we specify the member functions, we specify this part of the object

What is the behavior?

500

These are the only things that can access data members, since they are declared in the private section.

What are member functions?

500

These are nicknames to easily remember the mutators and accessors

What are "setters" and "getters"?

500

T/F

Some constructors should have parameters

TRUE

While not ALL constructors need parameters, SOME should have them!

M
e
n
u