Page 1 of 1

This is written in java. I have spent 3 hours trying to make this and I am just lost since my voids dont work. My friend

Posted: Fri May 20, 2022 3:16 pm
by answerhappygod
This is written in java. I have spent 3 hours trying to make
this and I am just lost since my voids dont work. My friend said we
need to make another class to define the voids so they can run
please help and explain the method <3 <3
Objects and Classes
Complete the following exercises by the due date.
Make sure your source code using appropriate programming
style (e.g., descriptive variable names, indenting, comments,
etc.).
Exercises
You have been asked to develop a program to simulate the
operation of an elevator for a three story
building. Unfortunately, this elevator can only go
up or down one floor at a time. So if you want it to go from
the first floor to the third floor, you must tell it to goUp()
(from the first to the second floor), and goUp() again to make it
to the third floor. The same applies to goDown().
Note: you will need separate source
file for the class definition and the elevator test program.
What to Turn In
For each exercise, submit the source code and the screen
output.