I am a freshman and new to Java. I am making an Elevator Simulation as my project but don't know how it works. I tried to upload the code I had but I was having format problem. So on the bottom, I wrote some classes and wrote what I am planning to write inside. It would be helpful if any of you can tell me what I need to improve or add. Instructions: The goal is to create an elevator simulation using object-oriented programming and polymorphism. The simulation involves 8 elevators, each of which can be one of 4 types with different percentages of requests, and 4 types of passengers with different percentages of requests. The elevator types include Standard, Express, Freight, and Glass elevators, while the passenger types include Standard, VIP, Freight, and Glass passengers. The simulation starts with a specified number of passengers added to different floors of the building, and during the simulation, the elevators will move up and down the building, picking up and dropping off passengers based on their types and the elevator types available. The simulation will continue for a specified number of iterations, during which the movements of the elevators and passengers will be recorded and displayed, along with wait times and travel times for each passenger, and any delays or malfunctions in the elevators. Sample Input File: Building parameters floors=30 Passengers to add to floors add_passenger 1 6 25 Standard 30 add_passenger 2 2 28 VIP 10 add_passenger 3 7 15 Freight 20 add_passenger 4 4 20 Glass 15 Elevator types elevator_type StandardElevator 10 40 elevator_type ExpressElevator 8 25 elevator_type FreightElevator 5 20 elevator_type GlassElevator 6 15 Percentage of passenger requests for each elevator type request_percentage StandardElevator 70 request_percentage ExpressElevator 20 request_percentage FreightElevator 5 request_percentage GlassElevator 5 Percentage of passenger requests for each passenger type passenger_request_percentage Standard 70 passenger_request_percentage VIP 10 passenger_request_percentage Freight 15 passenger_request_percentage Glass 5 Number of elevators in the system number_of_elevators 8 Run simulation for 60 iterations run_simulation 60 The classes I am using are: public class Simulation { The simulation class was supposed to initialize the simulation, should have the arrayList of Passengers, Elevators, and Floors, And also holds the process of the elevators.} public class SimulatorSettings { This should hold variables used for the program and I think should have information that is taken from setting.txt to run the program.} public class Building { The building class should hold variable like total floors and total elevators and also create a arraylists of elevators and floors} public class floor{ Should have a arraylist that adds passangers into random floors.} public abstract class Passenger { should have variables used in subclasses and intialize a passanger counter that keeps count of number of passengers} public class StandardPassenger, VIPPassenger, FreightPassenger, GlassPassenger extends Passenger{ Should be able to read methods from Passanger and should have RequestElevator (Used to geenerate a random start and end floor)and getPercent (should retrrieve the percent from the setting.txt file) } public abstract class Elevator { suppose to hold arraylist and variable needed for the each type of elevator } public class StandardElevator, ExpressElevator, FreightElevator, GlassElevator extends Elevator{ keep track of the amount of elevators contains methods of generating passengers into the elevator }

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question
I am a freshman and new to Java. I am making an Elevator Simulation as my project but don't know how it works. I tried to upload the code I had but I was having format problem. So on the bottom, I wrote some classes and wrote what I am planning to write inside. It would be helpful if any of you can tell me what I need to improve or add.

Instructions: The goal is to create an elevator simulation using object-oriented programming and polymorphism. The simulation involves 8 elevators, each of which can be one of 4 types with different percentages of requests, and 4 types of passengers with different percentages of requests. The elevator types include Standard, Express, Freight, and Glass elevators, while the passenger types include Standard, VIP, Freight, and Glass passengers. The simulation starts with a specified number of passengers added to different floors of the building, and during the simulation, the elevators will move up and down the building, picking up and dropping off passengers based on their types and the elevator types available. The simulation will continue for a specified number of iterations, during which the movements of the elevators and passengers will be recorded and displayed, along with wait times and travel times for each passenger, and any delays or malfunctions in the elevators.

Sample Input File:

Building parameters floors=30

Passengers to add to floors add_passenger 1 6 25 Standard 30 add_passenger 2 2 28 VIP 10 add_passenger 3 7 15 Freight 20 add_passenger 4 4 20 Glass 15

Elevator types elevator_type StandardElevator 10 40 elevator_type ExpressElevator 8 25 elevator_type FreightElevator 5 20 elevator_type GlassElevator 6 15

Percentage of passenger requests for each elevator type request_percentage StandardElevator 70 request_percentage ExpressElevator 20 request_percentage FreightElevator 5 request_percentage GlassElevator 5

Percentage of passenger requests for each passenger type passenger_request_percentage Standard 70 passenger_request_percentage VIP 10 passenger_request_percentage Freight 15 passenger_request_percentage Glass 5

Number of elevators in the system number_of_elevators 8

Run simulation for 60 iterations run_simulation 60

The classes I am using are:

public class Simulation { The simulation class was supposed to initialize the simulation, should have the arrayList of Passengers, Elevators, and Floors, And also holds the process of the elevators.}

public class SimulatorSettings { This should hold variables used for the program and I think should have information that is taken from setting.txt to run the program.}

public class Building { The building class should hold variable like total floors and total elevators and also create a arraylists of elevators and floors}

public class floor{ Should have a arraylist that adds passangers into random floors.}

public abstract class Passenger { should have variables used in subclasses and intialize a passanger counter that keeps count of number of passengers}

public class StandardPassenger, VIPPassenger, FreightPassenger, GlassPassenger extends Passenger{ Should be able to read methods from Passanger and should have RequestElevator (Used to geenerate a random start and end floor)and getPercent (should retrrieve the percent from the setting.txt file)

}

public abstract class Elevator { suppose to hold arraylist and variable needed for the each type of elevator }

public class StandardElevator, ExpressElevator, FreightElevator, GlassElevator extends Elevator{ keep track of the amount of elevators contains methods of generating passengers into the elevator

}

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps

Blurred answer
Knowledge Booster
Running Time of Application
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education