1. (TCO 2) Given the declaration: class myClass { public: void print(); int y; p
ID: 3540384 • Letter: 1
Question
1. (TCO 2) Given the declaration:
class myClass {
public:
void print();
int y;
private:
int x;
};
myClass myObject;
which statement is legal? (Points : 4) myObject.x = 10;
myClass.x = 10;
myObject.y = 10;
myClass.y = 10;
class myClass
{
public:
void print();
private:
int x;
};
myClass myObject;
which statement is legal? (Points : 4) myObject.print = 10;
myClass.print = 10;
myObject.print();
myClass.print();
Explanation / Answer
1.myObject.y = 10;
2. myObject.print();
3.incrementHours
4.
UML
5.
bigRect.print();
6.
aggregation
7.
ifdef
8.
An instruction to the compiler
9.
ifnotdef
10
using namespace and std
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.