Answer the following questions true (T) or false (F)

1. True/False: If one member of a class is private, all the members of that class must also be declared as private.

2. True/False: To refer to an object and one of its methods, we use dot notation.

3. True/False: A constructor in a class is a special method that can be used to create objects of that class.


1. F
2. T
3. T

Computer Science & Information Technology

You might also like to view...

To add an item to a CheckedListBox you may use:

a) the Add method b) the AddRange method c) the String Collection Editor d) All of the above

Computer Science & Information Technology

Compile CounterServer1.java and CounterClient1.java (“javac Counter*.java”). Run the server, then a client several times. Does the counter increase with each client?

This exercise deals with stateful servers that maintain global state information.

Computer Science & Information Technology

What is the output of the following code?

``` include using namespace std; class Foo { public: int x; // data field int y; // data field Foo() { x = 10; y = 10; } void p() { int x = 20; // local variable cout << "x is " << x << " "; cout << "y is " << y << endl; } }; int main() { Foo foo; foo.p(); return 0; } ``` a. x is 20 y is 20 b. x is 10 y is 10 c. x is 10 y is 20 d. x is 20 y is 10

Computer Science & Information Technology

Statements in a sequence structure are performed without any conditions.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology