|
Think of three behaviors a checking account should have. A good answer might be:The following seem reasonable to me:
|
Requirements for BehaviorWe will also need a constructor to create objects from the class, so we need to decide what the constructor should do. It seems reasonable that the constructor should create a new checking account and initialize it with the account number, the account holder's name, and starting balance. So now we have a fair idea about what this class will look like:
In a more complicated program, creating the specifications is very hard because objects of the new class will interact with perhaps hundreds of other objects. In this example program, the objects interacts only with the class that contains main(). |
QUESTION 4:Is there enough information to start writting the program? Click Here after you have answered the question |