This preview has intentionally blurred parts. Sign up to view the full document

View Full Document

Unformatted Document Excerpt

Object Oriented Programming Practice Questions CSE 100, Fall 2007 Arizona State University True/False Indicate whether the statement is true or false. ____ 1. In C++, class is a reserved word and it defines only a data type. ____ 2. The member variables of a class must be of the same type. ____ 3. The member functions of a class must be public . ____ 4. In a class, all function members are public and all member variables are private . ____ 5. A class and its members can be described graphically using Unified Modeling Language (UML) notation. ____ 6. Given the declaration class myClass { public: void print(); //Output the value of x; MyClass(); private: int x; }; myClass myObject; The following statement is legal. myObject.x = 10; ____ 7. Given the declaration class myClass { public: void print(); //Output the value of x; MyClass(); private: int x; }; myClass myObject; The following statement is legal. myObject.print = 10; ____ 8. The public members of a class must be declared before the private members. ____ 9. The constructor with no parameters is called the default constructor. Multiple Choice Identify the choice that best completes the statement or answers the question.... View Full Document

End of Preview

Sign up now to access the rest of the document