Question: Java - create a class standing desk, that models in office standing desk that can be lowered and raised to a comfortable heights. Use the
Java create a class standing desk, that models in office standing desk that can be lowered and raised to a comfortable heights. Use the attached project to import the given test class for your solutionpicture attatched & written after prompt Your solution needs to include the following: a constructor that accepts an initial height. Getters for current initial height. A raise method to change the current height upward. A lower method to change the current height downward. A reset method to bring the desk back to the initial height. Two consents to present the maximum height of cm and the minimum height of cm this would represent the upper and lower height range possible.
Java Test Class:
package desk;
public class TestStandingDesk
public static void mainString args
StandingDesk desk new StandingDesk:
pxintDesk desk:
desk raise;
printDesk desk;
desk. ower;
printDesk deskl;
deskreset:
pxintDesk desk;
desk:ower:
printDeskdesk:
Print the initial height and the current height of the desk to stdout:
Gparam desk
pxivate static Iinal void printDeskStandingDesk desk
System,ont.printnDesk min height desk.getinitialkeight
desk current height desk.getkeight:
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
