CIS 247 FINAL EXAM GUIDE

CIS 247 FINAL EXAM GUIDE - C++ CLASS CIS 247 FINAL EXAM

Info iconThis preview shows pages 1–5. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: C++ CLASS CIS 247 FINAL EXAM NAME_______________________________________ FINAL EXAMINATION WORTH 200 POINTS True/False Indicate whether the statement is true or false. ____ 1. By default, all members of a class are public. Pg.643 ____ 2. In C++, the terms objects and members mean the same thing. Pg. 646 ____ 3. Given the declaration. 646 - 648 class myClass { public: void print(); //Output the value of x; MyClass(); private: int x; }; myClass myObject; The following statement is legal. myObject.print = 10; ____ 4. The built-in operations on class objects are member selection and assignment. Pg. 648 ____ 5. A constructor has no type and is therefore a void function. Pg 663 ____ 6. A class can have more than one destructor. Pg. 673 ____ 7. 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 by using the name of the function and the appropriate parameter list. Pg. 745 ____ 8. The constructor of a derived class specifies a call to the constructor of a base class in the body of the function definition. Pg. 728 ____ 9. An OOD implements OOP. Pg 7 ____ 10. In C++, the asterisk character is only used as the binary multiplication operator. 788 ____ 11. In C++, the dot operator has a lower precedence than the dereferencing operator. 794 ____ 12. A memory leak is an unused memory space that cannot be allocated. 800 ____ 13. The binding of virtual functions occurs at program execution time. 826 ____ 14. If a class contains a pure virtual function, then the class is an abstract class. 831 ____ 15. An abstract class does not need to provide the definitions of the member functions that are not pure virtual because you cannot create objects of the abstract class. 832 Multiple Choice Identify the choice that best completes the statement or answers the question. ____ 16. The components of a class are called the ____ of the class. 642 a. elements c. objects b. members d. properties ____ 17. Which of the following class definitions is correct in C++? 642/644 a. class studentType { public: void setData(string, double, int); private: string name; }; b. class studentType { public: void setData(string, double, int); void print() const; private: string name; double gpa; } c. class studentType { public void setData(string, double, int); private string name; }; d. studentType class { public: void setData(string, double, int); private: string name; }; ____ 18. If a member of a class is ____, you cannot access it outside the class. 643 a. public c. private b. automatic d. static ____ 19. A class and its members can be described graphically using a notation known as the ____ notation. 645 a. OON c. UML b. OOD d. OOP clockType-hr: int-min: int-sec: int +setTime(int, int, int): void +getTime(int&, int&, int&) const: void +printTime() const: void +incrementSeconds(): int +incrementMinutes(): int +incrementHours(): int +equalTime(const clockType&) const: bool ____ 20. Consider the UML class diagram shown in the accompanying figure. Which of the following is the name of the class? 646 a. clock c. Type b. clockType d. +clockType ____ 21.____ 21....
View Full Document

This note was uploaded on 01/30/2011 for the course BUS 247 taught by Professor Long during the Winter '10 term at DeVry Long Beach.

Page1 / 15

CIS 247 FINAL EXAM GUIDE - C++ CLASS CIS 247 FINAL EXAM

This preview shows document pages 1 - 5. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online