C++ Object Oriented Programming Association,Aggregation and Composition (Chapter 7)

Consider the class diagram in Figure 7.10 which shows data model for a car rental company.Note the company has set the rule that each customer can only rent one car at a time.Based on the class diagram,write C++ program which perform the following tasks.
a.Implement all three classes with the given attributes and operations.Note that,the purpose ofeach operation is as the name implies.
b.Test the class by creating an object of Car and an array of customers with the following data:

Customer's Name     Phone Number         Rented Car Plate
Ahmad Kamal          015-75769800           JSQ245
Siti Nurdiana            014-8889900

Note that column "Rented Car Plate" for the second customer is empty because she does not rent any car at the moment.

Solution
 Output



Post a Comment

0 Comments