Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create a car rental system where customers rent cars for a given period of time Holds car information and an array of rents implement several

image text in transcribed

Create a car rental system where customers rent cars for a given period of time Holds car information and an array of rents implement several Car- a class for all cars. types of cars as subclasses o Small car - 4 passengers, Motor 1200, air-conditioner o Medium car - 4 passengers, Motor 1400, air-conditioner, Speed Control o Large car - 6 passengers, Motor 1600, air-conditioner, speed control, Wi-Fi. Keep the following car information for each car -holds the following fields: car type, . has insurance papers, car license, car number. . customer - holds first name, last name, id Rent- holds startDate and endDate, rent price, representing the time period when the car is rent. Implement the following interfaces: rentInterface -holds methods addRent(Srent) and removeRent(Srent) . Encapsulate all class fields with properties and validate the input data. Override the_toString0 method for each class to print information about the object. Write a static class RentingManager with method rentCar(Scar, Srent) that handles car renting and prints a message whether the operation was successful or not. Create an array of different cars. Perform the following operations Filter the array by small cars and medium ones with a rent price less or equal to 250.00 Filter the array by all cars with an air conditioner. Return the car numbers of all cars which have a wi-fi service Create a car rental system where customers rent cars for a given period of time Holds car information and an array of rents implement several Car- a class for all cars. types of cars as subclasses o Small car - 4 passengers, Motor 1200, air-conditioner o Medium car - 4 passengers, Motor 1400, air-conditioner, Speed Control o Large car - 6 passengers, Motor 1600, air-conditioner, speed control, Wi-Fi. Keep the following car information for each car -holds the following fields: car type, . has insurance papers, car license, car number. . customer - holds first name, last name, id Rent- holds startDate and endDate, rent price, representing the time period when the car is rent. Implement the following interfaces: rentInterface -holds methods addRent(Srent) and removeRent(Srent) . Encapsulate all class fields with properties and validate the input data. Override the_toString0 method for each class to print information about the object. Write a static class RentingManager with method rentCar(Scar, Srent) that handles car renting and prints a message whether the operation was successful or not. Create an array of different cars. Perform the following operations Filter the array by small cars and medium ones with a rent price less or equal to 250.00 Filter the array by all cars with an air conditioner. Return the car numbers of all cars which have a wi-fi service

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

Relational Database Design With Microcomputer Applications

Authors: Glenn A. Jackson

1st Edition

0137718411, 978-0137718412

More Books

Students also viewed these Databases questions