Display at least the waiting at each floor

Assignment Help JAVA Programming
Reference no: EM13312626

You are to write a program name elevator.java that simulates elevator services in a 12-floor building. There must be one elevator working this building.

Here are some requirements for the program:

1. The floors of the building are numbered 1 to 12.

2. The Initialization Phase: Randomly generate 8 floors to stop whilst going UP (No repetitions) and 5 Floors whilst going DOWN (no repetitions). USE ARRAYS :- UPARRAY and DOWNARRAY respectively. If the last stop going up was at floor 10, and a request was made from floor 12 to go down, then the elevator must go up to floor 11 to satisfy that request.

3. HINT: A good idea is to sort the UPARRAY in ascending order and sort the DOWNARRAY in descending order.

4. The elevator must be located on the 1st floor and the first request is made which must be a request to go up.

5. From the 1st floor, the elevator can only go in one direction - up. And from the 12th floor the elevator can only go in one direction - down.

6. If the elevator is on a given floor and is going down, then it could be used only to go down. Thus the direction in which the elevator is going must be known at all times and the floor to which it is going. If the elevator is going up, the request could be anywhere from floor 2 to 12. If it is going down, it can be from 12 to 1, with 1 being the default.

7. The location of the elevator must be known at all times. The program should provide output regarding the current floor, whether the elevator is going up or down, which floor it is starting from and which floor it is going to, as the following output will show:

8. To travel from one floor to another, it will take 2 seconds and the elevator will stay for 3 seconds at each floor.

9. Display at least the waiting at each floor - Flashing the count of the seconds. 


Attachment:- assigment.doc

Reference no: EM13312626

Questions Cloud

Explain the dissolution process completely stops : When a solute reaches its solubility limit in a solvent, the dissolution process completely stops. When a solute has large solubility in a solvent, the two compounds are miscible to each other.
Estimate the capacitance of this human capacitor : You and a close friend stand facing each other. You are as close as you can get without actually touching. If a wire is attached to each of you, estimate the capacitance of this "human capacitor
Depict every stereoisomer for 1-bromo-2-chloro-1 : Draw every stereoisomer for 1-bromo-2-chloro-1,2-difluorocyclopentane. Use wedge-and-dash bonds for the substituent groups, and be sure that they are drawn on the outside of the ring, adjacent to each other
List and explain the 4 pillars of sms : List and explain the 4 Pillars of SMS.
Display at least the waiting at each floor : From the 1st floor, the elevator can only go in one direction - up. And from the 12th floor the elevator can only go in one direction - down.
Why does the economy fall to pieces after a financial crisis : Why Does the Economy Fall to Pieces after a Financial Crisis - Prepare a powerpoint presentation talking about the document and also prepare an essay paper summarazing the article.
State the organic product(s) of the reaction : Draw the organic product(s) of the reaction of p-methylbenzoic acid with aqueous sodium hydroxide
Compute the moles of ammonia produced : calculate the moles of ammonia produced (e) calculate the partial pressures of all species in the system (f) the total pressure in the system
What is the speed of sound in air : A tuning fork with a frequency of 440 Hz is held just above the top of a uniform glass tube containing water. What is the speed of sound in air

Reviews

Write a Review

JAVA Programming Questions & Answers

  Recursive factorial program

Write a class Array that encapsulates an array and provides bounds-checked access. Create a recursive factorial program that prompts the user for an integer N and writes out a series of equations representing the calculation of N!.

  Hunt the wumpus game

Reprot on Hunt the Wumpus Game has Source Code listing, screen captures and UML design here and also, may include Javadoc source here.

  Create a gui interface

Create GUI Interface in java programing with these function: Sort by last name and print all employees info, Sort by job title and print all employees info, Sort by weekly salary and print all employees info, search by job title and print that emp..

  Plot pois on a graph

Write a JAVA program that would get the locations of all the POIs from the file and plot them on a map.

  Write a university grading system in java

University grading system maintains number of tables to store, retrieve and manipulate student marks. Write a JAVA program that would simulate a number of cars.

  Wolves and sheep: design a game

This project is designed a game in java. you choose whether you'd like to write a wolf or a sheep agent. Then, you are assigned to either a "sheep" or a "wolf" team.

  Build a graphical user interface for displaying the image

Build a graphical user interface for displaying the image groups (= cluster) in JMJRST. Design and implement using a Swing interface.

  Determine the day of the week for new year''s day

This assignment contains a java project. Project evaluates the day of the week for New Year's Day.

  Write a java windowed application

Write a Java windowed application to do online quiz on general knowledge and the application also displays the quiz result.

  Input pairs of natural numbers

Java program to input pairs of natural numbers.

  Create classes implement java interface

Interface that contains a generic type. Create two classes that implement this interface.

  Java class, array, link list , generic class

These 14 questions covers java class, Array, link list , generic class.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd