Posted By:
JAMES_WEST
Posted On:
Wednesday, January 21, 2004 08:36 AM
Draw class and object diagrams for vehicle rental service. A customer can rent any automobile including SUVs and trucks. The vehicle is rented for a certain number of days and with a finite number of miles. Identify the relevant objects, and corresponding classes. Include relevant attributes and operations. Thanks for your response, It made me work hard. Please check the following if you can add anything or point out something wrong: Class Vehicle Attributes: model, availability, mileage, license plate, rate Methods: +rent(), +return(), +new() Class Contract Attributes: account #, license #, VIN#, amount Methods: +new(), +cancel () +overdue() Class customer Attributes: Name
More>>
Draw class and object diagrams for vehicle rental service. A customer can rent any automobile including SUVs and trucks. The vehicle is rented for a certain number of days and with a finite number of miles. Identify the relevant objects, and corresponding classes. Include relevant attributes and operations.
Thanks for your response, It made me work hard. Please check the following if you can add anything or point out something wrong:
Class Vehicle
Attributes: model, availability, mileage, license plate, rate
Methods: +rent(), +return(), +new()
Class Contract
Attributes: account #, license #, VIN#, amount
Methods: +new(), +cancel () +overdue()
Class customer
Attributes: Name, address, phone, license#, account#
Methods: +new(), +delete() +pickup() +return()
Class Rental Agency
Attributes: account number, amount/rate, insurance, start date, end date, start mileage, end mileage
Methods: +add() +delete() +find() +invoice() +checkmileage() +checkavailability()
I was wondering if I could combine Rental Agency with Contract in one class? what's your opinion?
Relationship: Vehicle (1:N) Contract 0:1
Customer 1:1 contract 0:N
Customer 1:N Rental agency 1:1
Please correct me if I'm wrong on this and add anything which I may have skipped.
How do I go about the object diagram?
<<Less