Ch 4 Questions #1

 

Classes, Object and Methods

 

 

1.         What is an object?

 

2.         What is a class?

 

3.         What is an instance of a class?

 

4.         How many times may a class be instantiated?

 

5.         What are the two major components of a class?

 

6.         What is a constructor?

 

7.         In the "FlipRace" class on p. 197, how many instances of the "Coin" class are created?

 

8.         What is encapsulation?

 

9.         What is the difference between something being decalred private and something being declared public?

 

10.       Can public variables be accessed from outside the class?  How?