0% found this document useful (0 votes)
3 views1 page

Oopwith Java Assign

The document outlines the development of a Vehicle Management System using a Vehicle class with specific data members and an enum class for colors. It includes options for adding vehicles, displaying details, retrieving vehicle information by chassis number, applying discounts based on color, and purchasing vehicles with validation rules for data input. Key validation rules include preventing duplicate vehicles, ensuring the manufacture date falls within the current financial year, confirming valid colors, and setting price limits.

Uploaded by

sumitpatait2001
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views1 page

Oopwith Java Assign

The document outlines the development of a Vehicle Management System using a Vehicle class with specific data members and an enum class for colors. It includes options for adding vehicles, displaying details, retrieving vehicle information by chassis number, applying discounts based on color, and purchasing vehicles with validation rules for data input. Key validation rules include preventing duplicate vehicles, ensuring the manufacture date falls within the current financial year, confirming valid colors, and setting price limits.

Uploaded by

sumitpatait2001
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

To develop the Vehicle Management System from given data:

use Vehicle Class with data members:


chasisNo
color
price
discount
manufactureDate
and
use enum class as color class
grey,red,black,blue.

Options
1. Add Vehicle to the showroom.
Accept data --validate all i/ps --success -- add vehicle o.w : throw exc (built
in / custom exc)
2. Display all vehicle details
Add new Options in Showroom management system Options :
3. Get vehicle details
i/p : chasis no
o/p : vehicle details or err mesg via custom exception
4. Apply discount on all the vehicles of a specific color
i/p : color , % disocount
o/p : suitable message
5. Purchase Vehicle
i/p : vehicle's chasis no
In case of valid chasis no , if the vehicle is not already sold , accept delivery
address details & assign it to the
vehicle.
o/p : in case of invalid chasis no or vehicle already sold --throw custom exc
o.w : assign delivery address & give success message.
10. Exit
Add validation rules
1 No dup vehicles should be added in the showroom
2 manufactureDate : must be in current financial year(1st Apr 2022 ---31st Mar
2023)
3 Vehicle color must be available
4 price : min 10000 , max 100000

You might also like