Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create the following program using php (JavaScript is not allowed) Create a car rental system where customers rent cars for a given period of time

image text in transcribed

Create the following program using php (JavaScript is not allowed) Create a car rental system where customers rent cars for a given period of time Car-a class for all cars. Holds car information and an array of rents. Implement several types of cars as subclasses o Small car- 4 passengers, Motor 1200, air-conditioner Medium car-4 passengers, Motor 1400, air-conditioner, Speed Control o Large car: 6 passengers, Motor 1600, air-conditioner, speed control, Wi-Fi o Keep the following car information for each car - holds the following fields: car type has insurance papers, car license, car number Customer class: holds first name, last name, id .Rent class (representing the time period when the car is rent): holds startDate and endDate, rent price, In addition to the previous classes, Implement the following interface rentinterface- holds methods addRent($rent) and removeRent($rent). The Rent Class implements this interface Encapsulate all class fields with properties. Override the information about the object from the class in which it is instantiated Write a static class rentingManager with method rentCarcar, $rent) that handles car renting and prints a message whether the operation was successful or not. method for each class to print Now, after writing the code of the previous classes and interface, create an array of different cars Perform the following operations Create an array of cars, in which the array contains different objects of the three types of cars create the objects of the array and fill the objects with suitable data) .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 the following program using php (JavaScript is not allowed) Create a car rental system where customers rent cars for a given period of time Car-a class for all cars. Holds car information and an array of rents. Implement several types of cars as subclasses o Small car- 4 passengers, Motor 1200, air-conditioner Medium car-4 passengers, Motor 1400, air-conditioner, Speed Control o Large car: 6 passengers, Motor 1600, air-conditioner, speed control, Wi-Fi o Keep the following car information for each car - holds the following fields: car type has insurance papers, car license, car number Customer class: holds first name, last name, id .Rent class (representing the time period when the car is rent): holds startDate and endDate, rent price, In addition to the previous classes, Implement the following interface rentinterface- holds methods addRent($rent) and removeRent($rent). The Rent Class implements this interface Encapsulate all class fields with properties. Override the information about the object from the class in which it is instantiated Write a static class rentingManager with method rentCarcar, $rent) that handles car renting and prints a message whether the operation was successful or not. method for each class to print Now, after writing the code of the previous classes and interface, create an array of different cars Perform the following operations Create an array of cars, in which the array contains different objects of the three types of cars create the objects of the array and fill the objects with suitable data) .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

Machine Learning And Knowledge Discovery In Databases European Conference Ecml Pkdd 2010 Barcelona Spain September 2010 Proceedings Part 1 Lnai 6321

Authors: Jose L. Balcazar ,Francesco Bonchi ,Aristides Gionis ,Michele Sebag

2010th Edition

364215879X, 978-3642158797

More Books

Students also viewed these Databases questions

Question

Whats a media kit? What does a media kit typically contain?

Answered: 1 week ago

Question

=+about the acquisition are making investors nervous or happy?

Answered: 1 week ago

Question

Is interoperability a technical, fiscal or political problem?

Answered: 1 week ago

Question

Why does sin 2x + cos2x =1 ?

Answered: 1 week ago

Question

What are DNA and RNA and what is the difference between them?

Answered: 1 week ago

Question

Why do living creatures die? Can it be proved that they are reborn?

Answered: 1 week ago

Question

6. Have you used solid reasoning in your argument?

Answered: 1 week ago