יום ראשון, 3 באוקטובר 2010

Chapter 3 Test

3. The purpose of the ConvertToCents class is to make a value usable in the NumberofQuarters and NumberOfDollars classes.

6. The whole process is broken down into a few processes. Thisss is the idea of abstraction and modulization where one large thing is broken down and is taken care of one step at a time. The fact that the three classes are connected in one class (the Transaction class) makes it easier rather than having all of it be one class.

7.
     a. Object Reference

     b. Primitive type other than int.
"double" double amountGiven

     c. Object Creation

     d. Overloading

     e. Internal Method Call
changeinCents = numDollars.getChange(); (it invokes the getChange method in its class)


     f. External Method Call

8.
ConvertToCents -> NumberOfDollars -> Transaction

אין תגובות:

הוסף רשומת תגובה