Answered step by step
Verified Expert Solution
Question
1 Approved Answer
package com.cc . airline.utilities; import java.util.ArrayList; import com.cc . airline.ticketing.Seat; import com.cc . airline.ticketing.SeatingClass; import com.cc . airline.ticketing.SeatingPlan; public class Manifest { SeatingPlan plan; public
package com.ccairline.utilities;
import java.util.ArrayList;
import com.ccairline.ticketing.Seat;
import com.ccairline.ticketing.SeatingClass;
import com.ccairline.ticketing.SeatingPlan;
public class Manifest
SeatingPlan plan;
public ManifestSeatingPlan plan
this.plan plan;
private void printOut
ArrayList seats plan.getSeats;
System.out.printlnFlight manifest";
for Seat s: seats
System.out.printlns;
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;
List three defects that you located in the original code, and describe then as you would in a testers
defect report. Describe where user is in using the system and what the user input. Then state how
the system response deviated from expected output.
a Where:
User input:
System response:
b Where:
User input:
System response:
c Where:
User input:
System response:
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