Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Scenario: Vehicle Rental System Consider a Vehicle Rental System where a Rental Agency offers various types of Vehicles. Each Vehicle has information about its Model,

Scenario: Vehicle Rental System
Consider a Vehicle Rental System where a Rental Agency offers various types of Vehicles. Each
Vehicle has information about its Model, registration number, and rental price per day. Customers can rent a
Vehicle for a specified period.
1. Each Vehicle records its model, registration number, rental price per day, and current rental status.
2. The Model class should contain details about the vehicle model name and its manufacturer.
3. The Rental Agency must track all its available and rented vehicles.
4. A Customer has a unique ID, name, and can rent multiple vehicles, but each vehicle can be rented by
only one customer at a time.
5. Customers can search for available vehicles in the rental agency by model name.
6. When a customer rents a vehicle, the agency should update the vehicle's rental status and record the
details of the rental, including which customer has rented which vehicle, for how long, and the rental
4/4
start date.
7. Additionally, the system should calculate the total rental cost based on the number of days and the
vehicle's daily rental price.
Using the given requirements:
1. Draw a class diagram illustrating the classes, their relationships, and multiplicity. Focus on the attributes
and operations relevant to each class. (3 points)
2. Define the properties and methods for each class, emphasizing the system's functionality and the
relationships between the classes. (3 points)
3. Provide a Java skeleton for the classes and implement the method to calculate the total rental cost. (4
points)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Practical Azure SQL Database For Modern Developers Building Applications In The Microsoft Cloud

Authors: Davide Mauri, Silvano Coriani, Anna Hoffma, Sanjay Mishra, Jovan Popovic

1st Edition

1484263693, 978-1484263693

More Books

Students also viewed these Databases questions

Question

design a simple disciplinary and grievance procedure.

Answered: 1 week ago