Answered step by step
Verified Expert Solution
Question
1 Approved Answer
How do I get it so that when the user answers N to a buisness ticket it will accept the prompt the 1 st time?
How do I get it so that when the user answers N to a buisness ticket it will accept the prompt the st time?
Heres the code:
public static void mainString args
System.out.printlnFlight open for ticket sales.";
SeatingPlan plan new SeatingPlan;
Manifest manifest new Manifestplan;
SeatReserver reserver plan.getSeatReserver;
int seatsSold ;
UserPrompter prompter new UserPrompterDo you want to purchace a ticket?";
while prompter.getYesNoAnswer && seatsSold plan.getTotalSeats
for int c ; c SeatingClass.valueslength; c
SeatingClass sClass SeatingClass.valuesc;
if sClass.getNumSeatsSold sClass.getNumSeats
UserPrompter prompt new UserPrompter Do you want sClass class? ;
if promptgetYesNoAnswer
reserver.sellTicketsClass;
break;
manifest.printOut;
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started