
Patrick B. answered 10/18/20
Math and computer tutor/teacher
import java.io.*;
public class ShadyRestRoom
{
public void Go()
{
Console console = System.console();
String inbuff = null;
int iOptUserChoice = -1;
float price=0;
while ((iOptUserChoice<1) || (iOptUserChoice>3))
{
System.out.print(" Please select 1 for Queen, 2 for King, 3 for King + pullout :>");
inbuff = console.readLine();
iOptUserChoice = Integer.parseInt(inbuff);
}//while
switch (iOptUserChoice)
{
case 1: { price = 125; break; }
case 2: { price = 139; break; }
case 3: { price = 165; break; }
} //case
System.out.println(price);
}
public static void main(String args[])
{
ShadyRestRoom X = new ShadyRestRoom();
X.Go();
}
}