Using Java code an elevator simulator that uses polymorphism and object-oriented programming to
simulate the movement of elevators in a building with multiple types of passengers and elevators.
The system has 8 elevators, each of which can be one of 4 types of elevators, with a certain
percentage of requests for each type. Similarly, each passenger can be one of 4 types, with a
different percentage of requests for each type.
There are 4 types of passengers in the system:
Standard: This is the most common type of passenger and has a request percentage of 70%.
Standard passengers have no special requirements.
VIP: This type of passenger has a request percentage of 10%. VIP passengers are given priority
and are more likely to be picked up by express elevators.
Freight: This type of passenger has a request percentage of 15%. Freight passengers have large
items that need to be transported and are more likely to be picked up by freight elevators.
Glass: This type of passenger has a request percentage of 5%. Glass passengers have fragile items
that need to be transported and are more likely to be picked up by glass elevators.
There are 4 types of elevators in the system:
StandardElevator: This is the most common type of elevator and has a request percentage of 70%.
Standard elevators have a maximum capacity of 10 passengers.
ExpressElevator: This type of elevator has a request percentage of 20%. Express elevators have a
maximum capacity of 8 passengers and are faster than standard elevators.
FreightElevator: This type of elevator has a request percentage of 5%. Freight elevators have a
maximum capacity of 5 passengers and are designed to transport heavy items.
GlassElevator: This type of elevator has a request percentage of 5%. Glass elevators have a
maximum capacity of 6 passengers and are designed to transport fragile items.
Simulation:
The simulation starts with a specified number of passengers added to different floors of the
building, each with a specified starting floor, destination floor, passenger type, and percentage of
requests for that passenger type. The elevator types are also specified, with their maximum
capacities and percentages of requests.
During the simulation, the elevators will move up and down the building, picking up and dropping
off passengers as appropriate, based on their passenger types and the elevator types available, the
percentage of requests for each, and the number of elevators in the system. Elevators will prioritize
picking up passengers that match their type, and passengers will prioritize selecting elevators that
match their type.
The simulation will continue for a specified number of iterations, during which the movements of
the elevators and passengers will be recorded and displayed. The system will also keep track of
wait times and travel times for each passenger, as well as any delays or malfunctions in the
elevators.
Trending nowThis is a popular solution!
Step by stepSolved in 2 steps with 1 images
- Complete the following class diagram with the correct associations to make our object-oriented parking system complete.arrow_forwardC# LANGUAGE polymorphism to iterate across different employees. SEE PICTURE FOR EXAMPLE OUTPUT Employee 1 is HourlyEmployeeEmployee 2 is PerDaymployeeEmployee 3 is MonthlyEmployeearrow_forwardThis "Math Skill Builder" programming project will assess a few basic mathematics skills and includes a simple programmed interface to generate three Math skill builder problem sets in the area of arithmetic, geometry and statistics. Although the interface includes statistics, the problem sets are not generated and maybe used for an extra credit portion of this project. The program interface for each Math skill builder set generates four problems in a series that make up the set and uses randomly generated numbers in the range of 1 to 10, stored as double values.arrow_forward
- Help, I making a elevator simulator. I have to use polymorphism and object oriented programming to write this code. Can someone please help me improve this code I have. The remaining code is in the pictures. Any help is appreciated. Thank You! The simulation should have 4 types of Passengers: Standard: This is the most common type of passenger and has a request percentage of 70%. Standard passengers have no special requirements. VIP: This type of passenger has a request percentage of 10%. VIP passengers are given priority and are more likely to be picked up by express elevators. Freight: This type of passenger has a request percentage of 15%. Freight passengers have large items that need to be transported and are more likely to be picked up by freight elevators. Glass: This type of passenger has a request percentage of 5%. Glass passengers have fragile items that need to be transported and are more likely to be picked up by glass elevators. The simulation should also have 4 types…arrow_forwardUsing Java an elevator simulator that uses polymorphism and object-oriented programming tosimulate the movement of elevators in a building with multiple types of passengers and elevators.The system has 8 elevators, each of which can be one of 4 types of elevators, with a certainpercentage of requests for each type. Similarly, each passenger can be one of 4 types, with adifferent percentage of requests for each type. Passenger Types:There are 4 types of passengers in the system:Standard: This is the most common type of passenger and has a request percentage of 70%.Standard passengers have no special requirements.VIP: This type of passenger has a request percentage of 10%. VIP passengers are given priorityand are more likely to be picked up by express elevators.Freight: This type of passenger has a request percentage of 15%. Freight passengers have largeitems that need to be transported and are more likely to be picked up by freight elevators.Glass: This type of passenger has a request…arrow_forward1. Define a class named Randomwalker. A Randomwalker object should keep track of its (x, y) location. All walkers start at the coordinates (0, 0). When a walker is asked to move, it randomly moves either left, right, up or down. Each of these four moves should occur with equal probability. The resulting behavior is known as a "random walk." (A 2-dimensional random walk example is pictured at right.) Each Randomwal ker object should have the following public methods. You may add whatever fields or methods you feel are necessary to implement these methods: move () Instructs this random walker to randomly make one of the 4 possible moves (up, down, left, or right). getX () Returns this random walker's current x-coordinate. getY () Returns this random walker's current y-coordinate. getsters () Returns the number of steps this random walker has taken.arrow_forward
- Please prepare the case diagram and the class diagramarrow_forwardWrite a Bank Account class in python to manage the account of the users. A user can deposit (add money) and withdraw (take money) money from his/her own account based on availability. At the time of account creation, the user has to provide his/her first name, last name, date of birth, NID number, contact number and address. Moreover, the user should deposit a minimum of 1000 taka to create the account. This money will be added to his account. After account creation the bank will give an account number to the user. The user should use this account number to access his account (show current balance, deposit and withdraw)arrow_forward
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education