Deck 10: Defining Classes

ملء الشاشة (f)
exit full mode
سؤال
When several items variables or variables and functions) are grouped together into a single package, that is known as ______________.
استخدم زر المسافة أو
up arrow
down arrow
لقلب البطاقة.
سؤال
A member function that allows the user of the class to find out the value of a private data type is called a ___________________.
سؤال
A structure can only be passed to a function as a call-by-value parameter
سؤال
A structure definition ends with the closing brace and a _________.
سؤال
A derived class is more specific than its parent, or base class.
سؤال
All constructors for a class must be private.
سؤال
A function may return a structure.
سؤال
A member function that allows the user of the class to change the value of a private data type is called a ____________________.
سؤال
Different class may not have member functions with the same name.
سؤال
The assignment operator may not be used with objects of a class.
سؤال
A structure variable is a collection of smaller values called ____________ values
سؤال
Who can access private members in a class?
سؤال
Two different structure definitions may have the same member names.
سؤال
A struct variable is declared differently from a predefined type such as an int.
سؤال
The double colon ::) is known as the __________ operator.
سؤال
It is possible to have multiple private labels in a class definition.
سؤال
The keyword ________ defines a structure type definition.
سؤال
When a structure contains another structure variable as one of its members, it is known as a ___________________.
سؤال
A class member function may be private.
سؤال
Class data members are almost always public.
سؤال
In the following class constructor definition, the part of the header starting with a single colon is called the ________________.
BankAccount::BankAccount): balance0), interest0.0)
سؤال
What is wrong with the following structure definition?
Struct MyStruct
{
Int size;
Float weight;
}

A) Nothing
B) Can not have mixed data types in a structure
C) missing semicolon
D) Braces are not needed.
سؤال
If you have a class with a member function called displayostream& out), that will send the values in the class to the parameter stream, and you need to call that function from within another member function, how would you call it to print the data to the screen? ___________________________
سؤال
A member function of a class should be made private

A) always
B) only if it will never be used
C) if it will only be used by other members of the class
D) never, it is illegal to make a member function private.
سؤال
A class in which modifications to the implementation appear to be invisible to the user of the class is known as _________________.
سؤال
A member function that gets called automatically when an object of the class is declared is called a _______________.
سؤال
In a structure definition, the identifiers declared in the braces are called

A) classes
B) structs
C) member names
D) variables
سؤال
Given the following strucure definitions, what is the correct way to print the person's birth year?
Struct DateType
{
Int day;
Int month;
Int year;
}
Struct PersonType
{
Int age;
Float weight;
DateType birthday;
}
PersonType person;

A) cout << person.birthday.year;
B) cout << year;
C) cout << birthday.year;
D) cout << peson.year;
سؤال
C++11 allows you to have a constructor call another constructor. This feature is called _________________________.
سؤال
When defining a class, the class should be composed of the kind of values a variable of the class can contain, and

A) member functions for that class
B) the keyword private
C) other class definitions
D) nothing else
سؤال
Given the following strucure definition, what is the correct way to initialize a variable called today?
Struct DateType
{
Int day;
Int month;
Int year;
}

A) DateType today1,1,2000);
B) DateType today = 1,1,2000);
C) DateType today = {1,1,2000);
D) DateType today = {1,1,2000,0);
سؤال
The name of a constructor is _____________
سؤال
Which of the following is the correct function definition header for the getAge function which is a member of the Person class?

A) int getAge);
B) int getAge)
C) int Person:getAge)
D) int Person::getAge)
سؤال
Given the following class definition and the following member function header, which is the correct way to output the private data?
Class Person
{
Public:
Void outputPersonostream& out);
Private:
Int age;
Float weight;
Int id;
};
Void Person::outputPersonostream& out)
{
//what goes here?
}

A) out << person.age << person.weight << person.id;
B) out << person;
C) out << age << weight << id;
D) outputPersonperson);
سؤال
You specify an individual member of a struct by using

A) the assignment operator
B) an ampersand
C) an underscore
D) The dot operator
سؤال
If class A is derived from class B, then B is a _______ of A.
سؤال
C++11 allows you to directly set the member variables to initial values in the definition of the class. This feature is called __________________.
سؤال
To assign values to a structure variable, you use the

A) equals operator
B) assignment operator
C) extraction operator
D) less than operator
سؤال
The constructor of a class that does not have any parameters is called a __________ constructor.
سؤال
What can a constructor return? _______________
سؤال
A Member function that allows the user of the class to see the value in a data member is known as

A) a mutator function
B) a mutation
C) a manipulator function
D) an accessor function
سؤال
Data members or member functions of a class that are declared to be private may

A) only be accessed by the main program
B) only be accessed by members of the class
C) not be accessed by the class
D) are considered to be global variables
سؤال
Member functions of a class

A) may not be in the private section
B) must be in the private section
C) may be in either section
D) can not be called in the main program
سؤال
In a class, all members are ____________ by default

A) public
B) private
C) global
D) all of the above
سؤال
In a struct, all members are ____________ by default

A) public
B) private
C) global
D) all of the above
سؤال
Which part of the ADT tells the programmer using it how to use it?

A) the implementation
B) the interface
C) the abstractness
D) the scope resolution
سؤال
Given the following class definition, what is missing?
Class ItemClass
{
Public:
ItemClassint newSize, float newCost);
Int getSize);
Float getCost);
Void setSizeint newSize);
Void setCostfloat newCost);
Private:
Int size;
Float cost;
};

A) nothing
B) a default constructor
C) accessor functions
D) mutator functions
سؤال
Given the following class, what would be the best declaration for a constructor that would allow the user to initialize the object with an initial age and cost?
Class Wine
{
Public:
Wine);
Int getAge);
Float getCost);
Private:
Int age;
Float cost;
}

A) int getAgeint newAge);
B) Wine);
C) Wineint age);
D) Wineint newAge, float newCost);
سؤال
Given the following class and object declaration, how would you print out the age and cost of a bottle of wine?
Class Wine
{
Public:
Wine);
Int getAge);
Float getCost);
Private:
Int age;
Float cost;
}
Wine bottle;

A) cout << bottle;
B) cout << Wine.age, Wine.cost;
C) cout << bottle.getAge) << bottle.getCost);
D) cout << bottle.getAge << bottle.getCost;
E) cout << bottle.age << bottle.cost;
سؤال
A derived class has access to

A) the private functions and variables of its ancestor classes
B) the public functions and variables of its ancestor classes
C) only the functions and variables defined it its class
D) none of the above
سؤال
If you design a class with private data members, and do not provide mutators and accessors, then

A) The private data members can still be accessed from outside the class by using the & operator
B) The data can not be changed or viewed by anyone.
C) None of the above
D) A and B
سؤال
If you are designing a class for an ADT, you can tell if the class is an ADT if

A) when you change the implementation of the class, none of the rest of the program needs to change.
B) when you change the interface of the class, nothing else needs to change.
C) you change the privte part and the rest of the program using the ADT does not compile.
D) everything must be changed.
سؤال
A class member function that automatically initializes the data members of a class is called

A) the init function
B) an operator
C) a constructor
D) a cast
سؤال
Given the following class, what would be the best declaration for a mutator function that allows the user of the class to change the age?
Class Wine
{
Public:
Wine);
Int getAge);
Float getCost);
Private:
Int age;
Float cost;
}

A) int getAgeint newAge);
B) Wine);
C) void setAge);
D) void setAgeint newAge);
سؤال
If you have a class named myPersonClass, which of the following correctly declare a constructor in the class definition?

A) myPersonClass::myPersonClass);
B) myPersonClass);
C) init);
D) cast);
سؤال
Given the following class definition, how would you declare an object of the class, so that the object automatically called the default constructor?
Class ItemClass
{
Public:
ItemClass);
ItemClassint newSize, float newCost);
Int getSize);
Float getCost);
Void setSizeint newSize);
Void setCostfloat newCost);
Private:
Int size;
Float cost;
};

A) ItemClass) myItem;
B) ItemClass myItem1, 0.0);
C) ItemClass myItem;
D) ItemClass myItem);
E) You can not do this
سؤال
A data type consisting of data members and operations on those members which can be used by a programmer without knowing the implementation details of the data type is called

A) an abstract definition type
B) an available data type
C) an abstract data type
D) a primitive data type
سؤال
given the following class definition, how could you use the constructor to assign values to an object of this class?
Class CDAccount
{
Public:
CDAccount);
CDAccountfloat interest, float newBalance);
Float getBalance);
Float getRate);
Void setRatefloat interest);
Void setBalancefloat newBalance);
Private:
Float balance, rate;
};
And the following object declaration
CDAccount myAccount;

A) myAccount = CDAccountfloat myRate, float myBalance);
B) myAccount = CDAccount {myRate, myBalance};
C) myAccount = CDAccount[myRate, myBalance];
D) myAccount = CDAccountmyRate, myBalance);
سؤال
Developing an ADT means that the user of your class does not have to know the details about how the class is implemented. This is known as

A) interface
B) implementation
C) testing and debugging
D) information hiding
سؤال
A member function that allow the user of the class to change the value in a data member is known as

A) a mutator function
B) a mutation
C) a manipulator function
D) an accessor function
سؤال
Which of the following function declarations will accept either cout or a file stream object as its argument?

A) void output fstream &outFile);
B) void output ofstream &outFile);
C) void output ostream &outFile);
D) void output iostream &outFile);
فتح الحزمة
قم بالتسجيل لفتح البطاقات في هذه المجموعة!
Unlock Deck
Unlock Deck
1/61
auto play flashcards
العب
simple tutorial
ملء الشاشة (f)
exit full mode
Deck 10: Defining Classes
1
When several items variables or variables and functions) are grouped together into a single package, that is known as ______________.
data) encapsulation
2
A member function that allows the user of the class to find out the value of a private data type is called a ___________________.
accessor function.
3
A structure can only be passed to a function as a call-by-value parameter
False
4
A structure definition ends with the closing brace and a _________.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 61 في هذه المجموعة.
فتح الحزمة
k this deck
5
A derived class is more specific than its parent, or base class.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 61 في هذه المجموعة.
فتح الحزمة
k this deck
6
All constructors for a class must be private.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 61 في هذه المجموعة.
فتح الحزمة
k this deck
7
A function may return a structure.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 61 في هذه المجموعة.
فتح الحزمة
k this deck
8
A member function that allows the user of the class to change the value of a private data type is called a ____________________.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 61 في هذه المجموعة.
فتح الحزمة
k this deck
9
Different class may not have member functions with the same name.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 61 في هذه المجموعة.
فتح الحزمة
k this deck
10
The assignment operator may not be used with objects of a class.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 61 في هذه المجموعة.
فتح الحزمة
k this deck
11
A structure variable is a collection of smaller values called ____________ values
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 61 في هذه المجموعة.
فتح الحزمة
k this deck
12
Who can access private members in a class?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 61 في هذه المجموعة.
فتح الحزمة
k this deck
13
Two different structure definitions may have the same member names.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 61 في هذه المجموعة.
فتح الحزمة
k this deck
14
A struct variable is declared differently from a predefined type such as an int.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 61 في هذه المجموعة.
فتح الحزمة
k this deck
15
The double colon ::) is known as the __________ operator.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 61 في هذه المجموعة.
فتح الحزمة
k this deck
16
It is possible to have multiple private labels in a class definition.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 61 في هذه المجموعة.
فتح الحزمة
k this deck
17
The keyword ________ defines a structure type definition.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 61 في هذه المجموعة.
فتح الحزمة
k this deck
18
When a structure contains another structure variable as one of its members, it is known as a ___________________.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 61 في هذه المجموعة.
فتح الحزمة
k this deck
19
A class member function may be private.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 61 في هذه المجموعة.
فتح الحزمة
k this deck
20
Class data members are almost always public.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 61 في هذه المجموعة.
فتح الحزمة
k this deck
21
In the following class constructor definition, the part of the header starting with a single colon is called the ________________.
BankAccount::BankAccount): balance0), interest0.0)
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 61 في هذه المجموعة.
فتح الحزمة
k this deck
22
What is wrong with the following structure definition?
Struct MyStruct
{
Int size;
Float weight;
}

A) Nothing
B) Can not have mixed data types in a structure
C) missing semicolon
D) Braces are not needed.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 61 في هذه المجموعة.
فتح الحزمة
k this deck
23
If you have a class with a member function called displayostream& out), that will send the values in the class to the parameter stream, and you need to call that function from within another member function, how would you call it to print the data to the screen? ___________________________
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 61 في هذه المجموعة.
فتح الحزمة
k this deck
24
A member function of a class should be made private

A) always
B) only if it will never be used
C) if it will only be used by other members of the class
D) never, it is illegal to make a member function private.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 61 في هذه المجموعة.
فتح الحزمة
k this deck
25
A class in which modifications to the implementation appear to be invisible to the user of the class is known as _________________.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 61 في هذه المجموعة.
فتح الحزمة
k this deck
26
A member function that gets called automatically when an object of the class is declared is called a _______________.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 61 في هذه المجموعة.
فتح الحزمة
k this deck
27
In a structure definition, the identifiers declared in the braces are called

A) classes
B) structs
C) member names
D) variables
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 61 في هذه المجموعة.
فتح الحزمة
k this deck
28
Given the following strucure definitions, what is the correct way to print the person's birth year?
Struct DateType
{
Int day;
Int month;
Int year;
}
Struct PersonType
{
Int age;
Float weight;
DateType birthday;
}
PersonType person;

A) cout << person.birthday.year;
B) cout << year;
C) cout << birthday.year;
D) cout << peson.year;
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 61 في هذه المجموعة.
فتح الحزمة
k this deck
29
C++11 allows you to have a constructor call another constructor. This feature is called _________________________.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 61 في هذه المجموعة.
فتح الحزمة
k this deck
30
When defining a class, the class should be composed of the kind of values a variable of the class can contain, and

A) member functions for that class
B) the keyword private
C) other class definitions
D) nothing else
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 61 في هذه المجموعة.
فتح الحزمة
k this deck
31
Given the following strucure definition, what is the correct way to initialize a variable called today?
Struct DateType
{
Int day;
Int month;
Int year;
}

A) DateType today1,1,2000);
B) DateType today = 1,1,2000);
C) DateType today = {1,1,2000);
D) DateType today = {1,1,2000,0);
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 61 في هذه المجموعة.
فتح الحزمة
k this deck
32
The name of a constructor is _____________
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 61 في هذه المجموعة.
فتح الحزمة
k this deck
33
Which of the following is the correct function definition header for the getAge function which is a member of the Person class?

A) int getAge);
B) int getAge)
C) int Person:getAge)
D) int Person::getAge)
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 61 في هذه المجموعة.
فتح الحزمة
k this deck
34
Given the following class definition and the following member function header, which is the correct way to output the private data?
Class Person
{
Public:
Void outputPersonostream& out);
Private:
Int age;
Float weight;
Int id;
};
Void Person::outputPersonostream& out)
{
//what goes here?
}

A) out << person.age << person.weight << person.id;
B) out << person;
C) out << age << weight << id;
D) outputPersonperson);
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 61 في هذه المجموعة.
فتح الحزمة
k this deck
35
You specify an individual member of a struct by using

A) the assignment operator
B) an ampersand
C) an underscore
D) The dot operator
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 61 في هذه المجموعة.
فتح الحزمة
k this deck
36
If class A is derived from class B, then B is a _______ of A.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 61 في هذه المجموعة.
فتح الحزمة
k this deck
37
C++11 allows you to directly set the member variables to initial values in the definition of the class. This feature is called __________________.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 61 في هذه المجموعة.
فتح الحزمة
k this deck
38
To assign values to a structure variable, you use the

A) equals operator
B) assignment operator
C) extraction operator
D) less than operator
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 61 في هذه المجموعة.
فتح الحزمة
k this deck
39
The constructor of a class that does not have any parameters is called a __________ constructor.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 61 في هذه المجموعة.
فتح الحزمة
k this deck
40
What can a constructor return? _______________
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 61 في هذه المجموعة.
فتح الحزمة
k this deck
41
A Member function that allows the user of the class to see the value in a data member is known as

A) a mutator function
B) a mutation
C) a manipulator function
D) an accessor function
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 61 في هذه المجموعة.
فتح الحزمة
k this deck
42
Data members or member functions of a class that are declared to be private may

A) only be accessed by the main program
B) only be accessed by members of the class
C) not be accessed by the class
D) are considered to be global variables
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 61 في هذه المجموعة.
فتح الحزمة
k this deck
43
Member functions of a class

A) may not be in the private section
B) must be in the private section
C) may be in either section
D) can not be called in the main program
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 61 في هذه المجموعة.
فتح الحزمة
k this deck
44
In a class, all members are ____________ by default

A) public
B) private
C) global
D) all of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 61 في هذه المجموعة.
فتح الحزمة
k this deck
45
In a struct, all members are ____________ by default

A) public
B) private
C) global
D) all of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 61 في هذه المجموعة.
فتح الحزمة
k this deck
46
Which part of the ADT tells the programmer using it how to use it?

A) the implementation
B) the interface
C) the abstractness
D) the scope resolution
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 61 في هذه المجموعة.
فتح الحزمة
k this deck
47
Given the following class definition, what is missing?
Class ItemClass
{
Public:
ItemClassint newSize, float newCost);
Int getSize);
Float getCost);
Void setSizeint newSize);
Void setCostfloat newCost);
Private:
Int size;
Float cost;
};

A) nothing
B) a default constructor
C) accessor functions
D) mutator functions
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 61 في هذه المجموعة.
فتح الحزمة
k this deck
48
Given the following class, what would be the best declaration for a constructor that would allow the user to initialize the object with an initial age and cost?
Class Wine
{
Public:
Wine);
Int getAge);
Float getCost);
Private:
Int age;
Float cost;
}

A) int getAgeint newAge);
B) Wine);
C) Wineint age);
D) Wineint newAge, float newCost);
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 61 في هذه المجموعة.
فتح الحزمة
k this deck
49
Given the following class and object declaration, how would you print out the age and cost of a bottle of wine?
Class Wine
{
Public:
Wine);
Int getAge);
Float getCost);
Private:
Int age;
Float cost;
}
Wine bottle;

A) cout << bottle;
B) cout << Wine.age, Wine.cost;
C) cout << bottle.getAge) << bottle.getCost);
D) cout << bottle.getAge << bottle.getCost;
E) cout << bottle.age << bottle.cost;
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 61 في هذه المجموعة.
فتح الحزمة
k this deck
50
A derived class has access to

A) the private functions and variables of its ancestor classes
B) the public functions and variables of its ancestor classes
C) only the functions and variables defined it its class
D) none of the above
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 61 في هذه المجموعة.
فتح الحزمة
k this deck
51
If you design a class with private data members, and do not provide mutators and accessors, then

A) The private data members can still be accessed from outside the class by using the & operator
B) The data can not be changed or viewed by anyone.
C) None of the above
D) A and B
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 61 في هذه المجموعة.
فتح الحزمة
k this deck
52
If you are designing a class for an ADT, you can tell if the class is an ADT if

A) when you change the implementation of the class, none of the rest of the program needs to change.
B) when you change the interface of the class, nothing else needs to change.
C) you change the privte part and the rest of the program using the ADT does not compile.
D) everything must be changed.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 61 في هذه المجموعة.
فتح الحزمة
k this deck
53
A class member function that automatically initializes the data members of a class is called

A) the init function
B) an operator
C) a constructor
D) a cast
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 61 في هذه المجموعة.
فتح الحزمة
k this deck
54
Given the following class, what would be the best declaration for a mutator function that allows the user of the class to change the age?
Class Wine
{
Public:
Wine);
Int getAge);
Float getCost);
Private:
Int age;
Float cost;
}

A) int getAgeint newAge);
B) Wine);
C) void setAge);
D) void setAgeint newAge);
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 61 في هذه المجموعة.
فتح الحزمة
k this deck
55
If you have a class named myPersonClass, which of the following correctly declare a constructor in the class definition?

A) myPersonClass::myPersonClass);
B) myPersonClass);
C) init);
D) cast);
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 61 في هذه المجموعة.
فتح الحزمة
k this deck
56
Given the following class definition, how would you declare an object of the class, so that the object automatically called the default constructor?
Class ItemClass
{
Public:
ItemClass);
ItemClassint newSize, float newCost);
Int getSize);
Float getCost);
Void setSizeint newSize);
Void setCostfloat newCost);
Private:
Int size;
Float cost;
};

A) ItemClass) myItem;
B) ItemClass myItem1, 0.0);
C) ItemClass myItem;
D) ItemClass myItem);
E) You can not do this
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 61 في هذه المجموعة.
فتح الحزمة
k this deck
57
A data type consisting of data members and operations on those members which can be used by a programmer without knowing the implementation details of the data type is called

A) an abstract definition type
B) an available data type
C) an abstract data type
D) a primitive data type
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 61 في هذه المجموعة.
فتح الحزمة
k this deck
58
given the following class definition, how could you use the constructor to assign values to an object of this class?
Class CDAccount
{
Public:
CDAccount);
CDAccountfloat interest, float newBalance);
Float getBalance);
Float getRate);
Void setRatefloat interest);
Void setBalancefloat newBalance);
Private:
Float balance, rate;
};
And the following object declaration
CDAccount myAccount;

A) myAccount = CDAccountfloat myRate, float myBalance);
B) myAccount = CDAccount {myRate, myBalance};
C) myAccount = CDAccount[myRate, myBalance];
D) myAccount = CDAccountmyRate, myBalance);
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 61 في هذه المجموعة.
فتح الحزمة
k this deck
59
Developing an ADT means that the user of your class does not have to know the details about how the class is implemented. This is known as

A) interface
B) implementation
C) testing and debugging
D) information hiding
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 61 في هذه المجموعة.
فتح الحزمة
k this deck
60
A member function that allow the user of the class to change the value in a data member is known as

A) a mutator function
B) a mutation
C) a manipulator function
D) an accessor function
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 61 في هذه المجموعة.
فتح الحزمة
k this deck
61
Which of the following function declarations will accept either cout or a file stream object as its argument?

A) void output fstream &outFile);
B) void output ofstream &outFile);
C) void output ostream &outFile);
D) void output iostream &outFile);
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 61 في هذه المجموعة.
فتح الحزمة
k this deck
locked card icon
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 61 في هذه المجموعة.