Sedang Disiapkan

JAve Project 5

The file must be called <YourNameProg1.java> (driver program)

[url removed, login to view] (elevator file)

Example: [url removed, login to view] (driver program)

[url removed, login to view] is required for the elevator file

Ensure you include ALL files required to make your program compile and run.

I would like to see your .java files only.

Proper coding conventions required the first letter of the class start with a capital letter and the first letter of each additional word start with a capital letter.

4

Elevator Control

Write a program that mimics the operations of the inside of an elevator. More specifically, the program simulates what happens when the user chooses to go to a particular floor, and it simulates what happens when the user pulls the elevator’s fire alarm. Assume the elevator is in a high-rise building that has floors numbered 1 through 100.

[url removed, login to view]

Your driver class should call the Elevator class file and implements the requirements above. Refer to the sample output to see what the prompts and output should look like.

Within your driver class, use a loop that continues until the user enters “q” for quit. See the sample session for details.

As you implement your solution, you should find that the selectFloor and fireAlarm methods contain some repeated coding logic. To avoid unnecessary redundancies in your code, have those methods call an appropriate helper method.

Use a switch statement to handle the different choices for user input. (S-select floor, F-fire alarm, Q-quit)

32

[url removed, login to view]

Within your Elevator class, include these methods:

selectFloor - This method prompts the user for a floor selection and then performs input validation for the floor selection. If the floor selection is inappropriate (less than 1, greater than 100), then the method prints an error message. If the floor selection is OK, the method simulates going to that floor. See the sample session below for the format of the simulation message.

16

fireAlarm - This method prints a “danger” message and then simulates going to the first floor. Note that I’m assuming this is a high tech fire alarm that is programmed to force the elevator to go to the first floor! See the sample session below for the format of the “danger” message.

16

Upload your page to the Dropbox.

NOTE: Complete your activity and submit it to the Dropbox in eCollege

4

Total Points

80

Sample Session:

Welcome to Ken's elevator simulator!

Options: (s)elect a floor, (f)ire alarm, (q)uit

Enter s, f, or q ==> x

Invalid selection.

Options: (s)elect a floor, (f)ire alarm, (q)uit

Enter s, f, or q ==> F

Danger! You must exit the building now!

Options: (s)elect a floor, (f)ire alarm, (q)uit

Enter s, f, or q ==> s

Enter the floor that you'd like to go to ==> 102

Invalid floor selection - must be between 1 and 100.

Options: (s)elect a floor, (f)ire alarm, (q)uit

Enter s, f, or q ==> s

Enter the floor that you'd like to go to ==> 15

Going up..2..3..4..5..6..7..8..9..10..11..12..13..14..15..Ding!

Options: (s)elect a floor, (f)ire alarm, (q)uit

Enter s, f, or q ==> s

Enter the floor that you'd like to go to ==> 10

Going down..14..13..12..11..10..Ding!

Options: (s)elect a floor, (f)ire alarm, (q)uit

Enter s, f, or q ==> f

Danger! You must exit the building now!

Going down..9..8..7..6..5..4..3..2..1..Ding!

Options: (s)elect a floor, (f)ire alarm, (q)uit

Enter s, f, or q ==> q

Optional extension:

Some hotels cater to superstitious people by omitting the 13th floor. Modify your program so that there is no 13th floor.

Kemahiran: Java

Lihat lebih lanjut: jave example, elevator java program sample code, java program elevator, java program mimics operations inside elevator, kendeweyprog1, using final class methods program firealarm java, write program mimics operations inside elevator, elevator program java, java elevator program, within elevator class include methods, fire alarm simulator java, tech for less, sample it project, quit letter, q find, project details example, loop capital, letter example, java 1.5 for loop, java 1.5 for each, greater building, first tech, first capital, find tech, exit letter

Tentang Majikan:
( 7 ulasan ) Aubrey, United States

ID Projek: #369301

Dianugerahkan kepada:

prasunkanti

Serious service provider.

$30 USD dalam 0 hari
(16 Ulasan)
3.5

31 pekerja bebas membida secara purata $90 untuk pekerjaan ini

fstudio

Please see my email. Thanks

$80 USD dalam 2 hari
(55 Ulasan)
5.5
Team21

Hello, I can provide those two files in 2 hours from start of project. Please refer to PM for details.

$50 USD dalam sehari
(11 Ulasan)
5.5
MAnkita

Hello,Please refer your [url removed, login to view] you.

$250 USD dalam 3 hari
(15 Ulasan)
5.5
JavaBeau

Let's start:) Please check PMB.

$75 USD dalam sehari
(27 Ulasan)
5.1
Andrewmyk

Hello. I can make such java program for you fast and quality. About 13th floor - it can be option which inputs from command line or user can select it on program start. Best regards, Andrew.

$30 USD dalam sehari
(3 Ulasan)
4.7
AtlanticSoft

Hi please check pmb for details

$80 USD dalam 2 hari
(5 Ulasan)
4.5
sakthi85vel

hello sir, i can do this simulation.. thank you..

$30 USD dalam sehari
(12 Ulasan)
4.3
pantazoglou

Hi, I am a Java expert and can have your work done within one day. All requirements will be met along with the optional extensions. Will be glad to help you out!

$30 USD dalam sehari
(1 Ulasan)
1.0
KDMT

Hi, simple task, can complete this quickly, please see PMB - thanks.

$30 USD dalam 0 hari
(2 Ulasan)
0.5
wantedtop

Hello! i have compeleted my university and i am a game programmer. currently i am working in a software company and i have the experiance in java programming. so i can deliver this project with in few hour. al Lagi

$40 USD dalam sehari
(0 Ulasan)
0.0
bubblesTheCoder

Please check PMB

$30 USD dalam 2 hari
(0 Ulasan)
0.0
kj163

Programs in Java would be developed as per given specifications.

$100 USD dalam 3 hari
(0 Ulasan)
0.0
maialieg

Please check your PM

$200 USD dalam 3 hari
(0 Ulasan)
0.0
alf239

Already done; Need to discuss final changes like names, project documentation, and expected coding style (based on the task, it seems the solution snould not seem as if it was done by a pro, so we'll need to see wh Lagi

$100 USD dalam 0 hari
(0 Ulasan)
0.0
sanjeevsharma83

you can count on me... confident and trustworthy

$100 USD dalam sehari
(0 Ulasan)
0.0
sgnkar

Hi, I am ready to do this with in 5hrs

$90 USD dalam sehari
(0 Ulasan)
0.0
madavahegde

Hi, I can do this assignment. I am a sun certified java developer with 100% score. I have 3 years work experience JAVA programming.

$30 USD dalam sehari
(0 Ulasan)
0.0
cadyyy

Hi, I am a experienced programmer in Java. For your project, I am confident I can get it done with 2 days with fully satisfaction.

$80 USD dalam 2 hari
(0 Ulasan)
0.0
sbattula

Hi,Please check PM. Siva

$101 USD dalam 5 hari
(0 Ulasan)
0.0
StormyWaters86

This should be pretty straight forward. Can easily make it look like it was done by a student if need be, just need to know your knowledge level. Very well documented code to guide you through the basic outline of how Lagi

$30 USD dalam 0 hari
(0 Ulasan)
0.0