Question: public class SeatInfo { private String firstName; / / First name private String lastName; / / Last name private int amtPaid; / / Amount paid

public class SeatInfo {
private String firstName; // First name
private String lastName; // Last name
private int amtPaid; // Amount paid
// Method to initialize Seat fields
public void reserveSeat(String inFirstName, String inLastName, int ticketCost){
firstName = inFirstName;
lastName = inLastName;
amtPaid = ticketCost;
}
// Method to empty a Seat
public void makeEmpty(){
firstName = "empty";
lastName = "empty";
amtPaid =0;
}
// Method to check if Seat is empty
public boolean isEmpty(){
return firstName.equals("empty");
}
// Method to print Seat fields
public void printSeatInfo(){
System.out.print(firstName +"");
System.out.print(lastName +"");
System.out.println("Paid: "+ amtPaid);
}
public String getFirstName(){
return firstName;
}
public String getLastName(){
return lastName;
}
public int getAmountPaid(){
return amtPaid;
}
}
You are going to modify the program "Figure 15.10.1: A seat reservation GUI involving
a table, fields, and buttons." The first task is to create a project in NetBeans called
ProjectWeek11 but you will call the main class "SeatReservationFrame". Copy and
paste the "SeatReservationFrame.java" source code into the editor without erasing the
package statement. Create a second java file in the same package called "SeatInfo".
Copy and paste the "SeatInfo.java" source code into the editor for SeatInfo without
erasing the package statement. Compile and get the program to run. Analyze the
source code, the description of the program in the textbook section, and observe the
interactions with the program
ReservationData.
0,Martha,Hobson,45
5,John,Boraxle,60
8,Gene,Baxter,7000
11,Javier,Georges,65
12,Kyle,Ferrani,57
19,Shaniqua,James,200

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Accounting Questions!