Question: 1. (TCO 2) In C++, which terms mean the same thing? (Points : 4) Member functions and objects Member variables and properties Objects and classes

1. (TCO 2) In C++, which terms mean the same thing? (Points : 4)
Member functions and objects Member variables and properties Objects and classes Member variables and objects

Question 2.2. (TCO 2) Suppose that you have the following UML class diagram of a class. According to the UML class diagram, what is the number of private members of the class? (Points : 4)
One Two Three Four

Question 3.3. (TCO 2) Given: bool clockType::equalTime(const clockType&) const {...} void clockType::getTime(int&, int&, int&) const {...} The word _____ at the end of the member functions in the class clockType specifies that these functions cannot modify the member variables of a clockType object. (Points : 4)
void const clockType:: &

Question 4.4. (TCO 2) A _____ sign in front of a member name on the UML diagram indicates that this member is public. (Points : 4)
+ - # $

Question 5.5. (TCO 2) Consider the following class definition. class circleType { public: void set(double r); //Postcondition: radius = r; void print(); //Output radius, area, and circumference. double area(); //Postcondition: Calculate and return area. double circumference(); //Postcondition: Calculate and return circumference. circleType(); //Postcondition: radius = 0; circleType(double r); //Postcondition: radius = r; private: double radius; }; and the declaration circleType myCircle; double r; Which of the following statements are valid in C++? (i) cin >> r; myCircle.area = 3.14 * r * r; cout (ii) cin >> r; myCircle.set(r); cout (Points : 4)
Only (i) Only (ii) Both (i) and (ii) None of these

Question 6.6. (TCO 3) Which is a true statement about classes and structures? (Points : 4)
Both classes and structures are private by default. Both classes and structures are public by default. Classes are public by default, structures are private. Structures are public by default, classes are private.

Question 7.7. (TCO 8) When creating a macro, which preprocessor directive is used? (Points : 4)
ifndef define ifdef endif

Question 8.8. (TCO 8) In a multifile, object-oriented C++ project, which is the correct statement for the constructor implementation, given that the constructor is correctly defined in the class definition file? (Points : 4)
Classname:Classname{ } Classname { } Classname::Classname { } Classname { }

Question 9.9. (TCO 8) Which is not a preprocessor directive statement? (Points : 4)
define include ifdef ifnotdef

Question 10.10. (TCO 8) Which one of the commonly used include (header) files is not covered by the std namespace? (Points : 4)

math iomanip string iostream

-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

1. (TCO 2) In C++, the _____ is an operator called the member access operator. (Points : 4)
. , :: #
Question 2.2. (TCO 3) What is the correct statement for declaring an array of 10 objects of ClassB? (Points : 4)
ClassB[10]; ClassB->objectB[10]; ClassB objectB[10]; objectB = new [10] ClassB;
Question 3.3. (TCO 4) Single inheritance means (Points : 4)
that the derived class is derived from a single base class. that only multiple classes can be derived from the given base class. that only one base class can be derived. single inheritance is not possible in C++.
Question 4.4. (TCO 4) If the derived class does not override a public member function of the base class, you may specify a call to that public member function that has parameters by (Points : 4)
using the name of the function and no parameter list. using only the name of the function. using the name of the function and the appropriate parameter list. Public member functions cannot be accessed in a derived class.
Question 5.5. (TCO 4) Which of the following is true about a derived class? (Points : 4)
A derived class can directly access any member variable of the base class. A derived class can redefine any public member function of the base class. A derived class can have at most one base class. A derived class can redefine any member function of the base class.
Question 6.6. (TCO 4) OOP implements _____. (Points : 4)
UML IPE EIP OOD
Question 7.7. (TCO 4) If class AClass is derived from class BClass, which one of the following statements correctly states the constructor call sequence when an object of AClass is instantiated? (Points : 4)
BClass constructor first, AClass constructor second AClass constructor first, BClass constructor second BClass constructor only; the AClass constructor is not called if AClass derived private from BClass AClass constructor only; the BClass constructor is not called if BClass derived private from AClass
Question 8.8. (TCO 4) If class AClass is derived from class BClass, which one of the following statements correctly states the destructor call sequence when an object of AClass goes out of scope? (Points : 4)
BClass destructor first, AClass destructor second AClass destructor first, BClass destructor second BClass destructor only; the AClass destructor is not called if AClass derived private from BClass AClass destructor only; the BClass destructor is not called if BClass derived private from AClass
Question 9.9. (TCO 4) Which of the following relationships is not a correct example of inheritance? (Points : 4)
Parent to Children Aunt to Uncle Grandparent to Grandchild Father and Mother to Children
Question 10.10. (TCO 8) In a multifile, object-oriented C++ project, which file contains the class implementation? (Points : 4)
classname.hdr classname.h classname.def classname.cpp

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!