member function that initializes the data members
What is a constructor
A programming style in which tasks are solved by collaborating object
what is object orientation programming
What are the two sections within a class definition?
Private and public
Where are member functions declared?
public interface of class definition
the value that keeps track of how many times our counter is updated
what is object state
his constructor has no parameters
what is default constructor
the specifics for the member functions that you can use
what is public interface
Data members are defined and found within which section?
private
Where are the member functions defined?
After the class definition
An object stores its state in ___
what is data members
A ____ can have multiple constructors
What is class
having public interface while hiding the implementation details
encapsulation
What is the different between a setter and a getter?
A setter changes the values of a data members while a getter returns a data member.
when defing an accesor function what should be added following the parameter?
const
a class has __ and __ sections
what is private and public
Constructors are ___ in a class definition
what is declared
before object orientation programming how did people decompose tasks
what it function
Define a member function that increase the value of a data member by 5%.
void percent_increase(int value);
how to define member function
return type ClassName::memberfunction();
member functions is __ section
what is public section
Constructors never____
what is return value
whats the specifications for a member function
public interference
What is wrong with the folloing definition (2 things):
class cat
{
public:
void meow();
void jump();
void set_age(int new_age);
void set_name(string new_name);
int get_age() const;
string get_name() const;
private:
int age;
string name;
}
Cat must be capitliazed and second bracket needs ;
How is a member function called?
in the main - constructor name.memberfucntion();
data members is __ section
what is private section