Question

Write in Java Movie Theater Ticket App Write a program that allows a user to purchase...

Write in Java

Movie Theater Ticket App

  • Write a program that allows a user to purchase movie tickets for a showing of one of three movies.
  • Your program will work with two files - a Movie.java and Theater.java file - which will interact with each other.
  • You should begin by creating three Movie objects which will store information about three movies of your choice
  • Once the information has been stored, the program should welcome the user and ask the user to type in the name of one of the three movies
  • Then, the program should allow the user to select seats based on a seating chart, stored as a 2D array.
  • The user should be allowed to purchase as many tickets as desired (until the theater is sold out!)
  • At the end of the program, display the total number of seats purchased by the user as well at the total cost.
  • Below is the required starter code for this program:

Movies.java File:

  • The Movies.java file contains 6 variables, storing information about the name, price, total number of tickets sold, and showtime of the movie, as well as a 2D array storing the seating chart for the movie.
  • Note that all seats should be open at the start of the program (open seats represented as "X")
  • Additionally, this class has 3 methods as described below

/**
* @author
* @author
* Lab 6, Movie.java
*/
public class Movie {
    public String name;
    public double price;
    public String showTime;
    public final int SIZE = 9;
    public int ticketsSold;
    public String[][] seats = new String[SIZE][SIZE];
   
    /**
    * Assigns the value of "X" to each
    * seat in the seats array
    */
    public void initializeSeats() {
       
    }
   
    /**
    * Prints out information about the movie
    * in the format
    *
    * Ticket Price: $
    * Show time:
    * Note that there are no <> around the output
    * The <> mean fill in here
    */
    public void printMovieStats() {
       
    }
   
    /**
    * Prints out the seats array to the console
    * with row and column numbers
    * and with the placement of the SCREEN in
    * row 10
    * Along with the message "Here are the
    * available seats for :"
    * Note that there are no <> around the output
    */
    public void printSeatingChart() {
       
    }
}

  • Note: you are not allowed to implement any additional methods aside from those whose signatures are provided or to alter the method signatures in any way from what is provided, or you will not receive credit for this assignment.

Theater.java File:

  • The Theater.java file contains a main method, and code to interact with the user and the Movie class.
  • In main, you should create 3 Movie objects of your choice. Note that you may also update the Star Wars example code below to be a movie of your choice.
  • Theater.java has an optional method described below. Note that you are not required to implement this method in your program.
  • You may optionally add any additional methods to this class that you would find useful.
  • When the program starts, the user should be presented with the three movie choices.
    • The user should be allowed to type both capital and lower case letters for the movie name.
  • The user can select one of the movies and purchase as many tickets as desired for that movie (see example output below).
  • Initially, the theater should be empty (all seats marked with "X" to indicate they are open).
  • As the user purchases tickets, the open seats should be replaced with a "T" (for taken).
  • The program should do some error checking to prevent the user from purchasing a seat that is already taken (see example output below).
  • At the end of the program, print the total number of tickets purchased and the total price (see sample output).

/**
* @author
* @author
* Lab 6, Theater.java
*/

import java.util.Scanner;

public class Theater {
    public static void main(String[] args) {
        int row, col;
        String choice;
        Scanner input = new Scanner(System.in);
        Movie starWars = new Movie();
        starWars.name = "Star Wars: The Rise of Skywalker";
        starWars.price = 10.50;
        starWars.ticketsSold = 0;
        starWars.showTime = "9:00pm";
       
        starWars.initializeSeats();
       

        //Add two more movie objects here - movies of your choice!

       
        System.out.println("Welcome to the CineBucks Movie Theater!");
        System.out.println("\nBelow are our current movies and showtimes:\n");
       
       
        input.close();
    }
   
    /**
    * This method is optional, but can be used
    * to avoid repetitive code for each movie
    * menu option
    * @param m the Movie object, for the movie
    * selected by the user
    * @param input the Scanner object
    */
    public static void menuItem(Movie m, Scanner input) {
       
    }
}

  • When your program is working *identically* to the sample output shown below, including the demonstrated error checking, please submit both Movie.java and Theater.java to Canvas.

Sample Output:

Welcome to the CineBucks Movie Theater!

Below are our current movies and showtimes:

Star Wars: The Rise of Skywalker
Ticket price: $10.50
Show time: 9:00pm

Little Women
Ticket price: $11.00
Show time: 6:50pm

1917
Ticket price: $14.95
Show time: 8:15pm

Enter the name of the movie: little women


Here are the available seats for Little Women:

1 2 3 4 5 6 7 8 9
1 X X X X X X X X X
2 X X X X X X X X X
3 X X X X X X X X X
4 X X X X X X X X X
5 X X X X X X X X X
6 X X X X X X X X X
7 X X X X X X X X X
8 X X X X X X X X X
9 X X X X X X X X X
*******SCREEN******

Enter the rowcol of the seat to purchase: 23
Your ticket is confirmed!


Here are the available seats for Little Women:

1 2 3 4 5 6 7 8 9
1 X X X X X X X X X
2 X X T X X X X X X
3 X X X X X X X X X
4 X X X X X X X X X
5 X X X X X X X X X
6 X X X X X X X X X
7 X X X X X X X X X
8 X X X X X X X X X
9 X X X X X X X X X
*******SCREEN******

Another seat (y/n)?: y


Here are the available seats for Little Women:

1 2 3 4 5 6 7 8 9
1 X X X X X X X X X
2 X X T X X X X X X
3 X X X X X X X X X
4 X X X X X X X X X
5 X X X X X X X X X
6 X X X X X X X X X
7 X X X X X X X X X
8 X X X X X X X X X
9 X X X X X X X X X
*******SCREEN******

Enter the rowcol of the seat to purchase: 23

Sorry! That seat is already taken!
Please try again.


Another seat (y/n)?: y


Here are the available seats for Little Women:

1 2 3 4 5 6 7 8 9
1 X X X X X X X X X
2 X X T X X X X X X
3 X X X X X X X X X
4 X X X X X X X X X
5 X X X X X X X X X
6 X X X X X X X X X
7 X X X X X X X X X
8 X X X X X X X X X
9 X X X X X X X X X
*******SCREEN******

Enter the rowcol of the seat to purchase: 24
Your ticket is confirmed!


Here are the available seats for Little Women:

1 2 3 4 5 6 7 8 9
1 X X X X X X X X X
2 X X T T X X X X X
3 X X X X X X X X X
4 X X X X X X X X X
5 X X X X X X X X X
6 X X X X X X X X X
7 X X X X X X X X X
8 X X X X X X X X X
9 X X X X X X X X X
*******SCREEN******

Another seat (y/n)?: y


Here are the available seats for Little Women:

1 2 3 4 5 6 7 8 9
1 X X X X X X X X X
2 X X T T X X X X X
3 X X X X X X X X X
4 X X X X X X X X X
5 X X X X X X X X X
6 X X X X X X X X X
7 X X X X X X X X X
8 X X X X X X X X X
9 X X X X X X X X X
*******SCREEN******

Enter the rowcol of the seat to purchase: 24

Sorry! That seat is already taken!
Please try again.


Another seat (y/n)?: y


Here are the available seats for Little Women:

1 2 3 4 5 6 7 8 9
1 X X X X X X X X X
2 X X T T X X X X X
3 X X X X X X X X X
4 X X X X X X X X X
5 X X X X X X X X X
6 X X X X X X X X X
7 X X X X X X X X X
8 X X X X X X X X X
9 X X X X X X X X X
*******SCREEN******

Enter the rowcol of the seat to purchase: 25
Your ticket is confirmed!


Here are the available seats for Little Women:

1 2 3 4 5 6 7 8 9
1 X X X X X X X X X
2 X X T T T X X X X
3 X X X X X X X X X
4 X X X X X X X X X
5 X X X X X X X X X
6 X X X X X X X X X
7 X X X X X X X X X
8 X X X X X X X X X
9 X X X X X X X X X
*******SCREEN******

Another seat (y/n)?: y


Here are the available seats for Little Women:

1 2 3 4 5 6 7 8 9
1 X X X X X X X X X
2 X X T T T X X X X
3 X X X X X X X X X
4 X X X X X X X X X
5 X X X X X X X X X
6 X X X X X X X X X
7 X X X X X X X X X
8 X X X X X X X X X
9 X X X X X X X X X
*******SCREEN******

Enter the rowcol of the seat to purchase: 26
Your ticket is confirmed!


Here are the available seats for Little Women:

1 2 3 4 5 6 7 8 9
1 X X X X X X X X X
2 X X T T T T X X X
3 X X X X X X X X X
4 X X X X X X X X X
5 X X X X X X X X X
6 X X X X X X X X X
7 X X X X X X X X X
8 X X X X X X X X X
9 X X X X X X X X X
*******SCREEN******

Another seat (y/n)?: n

You ordered 4 tickets for Little Women at 6:50pm.
Your total today is: $44.00.


Thank you! Please come again.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Summary:-

Object:- Object can be defined as a variable of the class. It holds all the attributes/characteristics of the class.

  • for ex: If a person is an object, then name, age, gender are attributes of the object.

Following are the utilities used in the program:-

  • Scanner -It is used to accepts the input from the user.
  • .equalsIgnoreCase() - It is a method which return true if 2 strings are matched(case sensitivity does not matter).
    • for ex: String name="Dave";
    • name.equalsIgnoreCase("dave") will return true.

Code:-

The entire code has been written in NetBeans IDE.

(Note:- Please refer the comments in the code below, they are self-explanatory)

The project consists of 2 files:-

  • Movie.java
  • Theater.java

Movie.java


public class Movie {
public String name;
public double price;
public String showTime;
public final int SIZE = 9;
public int ticketsSold;
public String[][] seats = new String[SIZE][SIZE];

/**
* Assigns the value of "X" to each
* seat in the seats array
*/
public void initializeSeats() {
for(int i=0;i<SIZE;i++){
for(int j=0;j<SIZE;j++){
seats[i][j]="X"; //initialize as empty seat
}
}
}

/**
* Prints out information about the movie
* in the format
*
* Ticket Price: $
* Show time:
* Note that there are no <> around the output
* The <> mean fill in here
*/
public void printMovieStats() {
/* print movie stats here */
System.out.println(" "+this.name);
System.out.println("Ticket Price : $ "+this.price);
System.out.println("Show time : "+this.showTime);
}

/**
* Prints out the seats array to the console
* with row and column numbers
* and with the placement of the SCREEN in
* row 10
* Along with the message "Here are the
* available seats for :"
* Note that there are no <> around the output
*/
public void printSeatingChart() {
/* print seating arrangement here */
System.out.println("Here are the available seats for : "+this.name);
System.out.print(" ");
for(int i=1;i<=9;i++)
System.out.print(i+" ");
System.out.println("");
for(int i=0;i<SIZE;i++){
System.out.print(""+(i+1));
for(int j=0;j<SIZE;j++){
System.out.print(" "+seats[i][j]);
}
System.out.println("");
}
System.out.println("******************** SCREEN *********************");
}
}

Theater.java


import java.util.Scanner;

public class Theater {
public static void main(String[] args) {
  
String choice;
Scanner input = new Scanner(System.in);
  
/* INITIALIZE MOVIE OBJECTS HERE */
Movie starWars = new Movie();
Movie bond=new Movie();
Movie valor=new Movie();
  
/* DETAILS OF 3 MOVIES */
starWars.name = "Star Wars: The Rise of Skywalker"; // set name
starWars.price = 10.50; //set price
starWars.ticketsSold = 0; //set price
starWars.showTime = "9:00pm"; // set time

starWars.initializeSeats(); //initialize seating arrangement
  

bond.name = "Skyfall - James Bond";
bond.price = 10.50;
bond.ticketsSold = 0;
bond.showTime = "9:00pm";

bond.initializeSeats();
  
  
valor.name = "The Act Of Valor";
valor.price = 10.50;
valor.ticketsSold = 0;
valor.showTime = "9:00pm";

valor.initializeSeats();
  
//Add two more movie objects here - movies of your choice!
  

System.out.println("Welcome to the CineBucks Movie Theater!");
System.out.println("\nBelow are our current movies and showtimes:\n");
  
starWars.printMovieStats(); // print movie stats
bond.printMovieStats();
valor.printMovieStats();
  
  
System.out.println("Enter the name of the movie: ");
choice=input.nextLine(); // get the name of movie here
  
if(choice.equalsIgnoreCase(starWars.name)){ // if movie is starWars
  
menuItem(starWars,input); //call to function here
  
  
}else if(choice.equalsIgnoreCase(bond.name)){ // if movie is james bond
  
menuItem(bond,input);
  
}else if(choice.equalsIgnoreCase(valor.name)){ //if movie is valor
  
menuItem(valor,input);
}
  

input.close();
}

/**
* This method is optional, but can be used
* to avoid repetitive code for each movie
* menu option
* @param m the Movie object, for the movie
* selected by the user
* @param input the Scanner object
*/
public static void menuItem(Movie m, Scanner input) {
String y;
int COUNT=0;
do{
m.printSeatingChart();

System.out.println("Enter the rowcol of the seat to purchase");
int row=input.nextInt();
int col=input.nextInt();

if(m.seats[row-1][col-1].equals("T")){ //it it is already occupied
System.out.println("Sorry! That seat is already taken!\n" +
"Please try again.");
}else{
m.seats[row-1][col-1]="T"; //occupy the seat here
System.out.println("Your ticket is confirmed!");
COUNT+=1; //increment the counter
}
m.printSeatingChart(); //print seating chart here
  
System.out.println("Another seat (y/n)?: y");
y=input.next(); // input for choice here

}while(y.equals("y")); //iterate till user inputs 'n'

/* print the final result here */
System.out.println("You ordered "+COUNT+" tickets for "+m.name+" at "+m.showTime+".\n" +
"Your total today is: $ "+(COUNT * m.price));
  
  
}
}

Code Snapshots (for Indentation reference only)

(Note: Below code is in the sublime text editor)

Movie.java

Theater.java

Output:-

Welcome to the CineBucks Movie Theater!

Below are our current movies and showtimes:

Star Wars: The Rise of Skywalker
Ticket Price : $ 10.5
Show time : 9:00pm
Skyfall - James Bond
Ticket Price : $ 10.5
Show time : 9:00pm
The Act Of Valor
Ticket Price : $ 10.5
Show time : 9:00pm
Enter the name of the movie:
the act of valor
Here are the available seats for : The Act Of Valor
1 2 3 4 5 6 7 8 9
1 X X X X X X X X X
2 X X X X X X X X X
3 X X X X X X X X X
4 X X X X X X X X X
5 X X X X X X X X X
6 X X X X X X X X X
7 X X X X X X X X X
8 X X X X X X X X X
9 X X X X X X X X X
******************** SCREEN *********************
Enter the rowcol of the seat to purchase
3
4
Your ticket is confirmed!
Here are the available seats for : The Act Of Valor
1 2 3 4 5 6 7 8 9
1 X X X X X X X X X
2 X X X X X X X X X
3 X X X T X X X X X
4 X X X X X X X X X
5 X X X X X X X X X
6 X X X X X X X X X
7 X X X X X X X X X
8 X X X X X X X X X
9 X X X X X X X X X
******************** SCREEN *********************
Another seat (y/n)?: y
y
Here are the available seats for : The Act Of Valor
1 2 3 4 5 6 7 8 9
1 X X X X X X X X X
2 X X X X X X X X X
3 X X X T X X X X X
4 X X X X X X X X X
5 X X X X X X X X X
6 X X X X X X X X X
7 X X X X X X X X X
8 X X X X X X X X X
9 X X X X X X X X X
******************** SCREEN *********************
Enter the rowcol of the seat to purchase
5
6
Your ticket is confirmed!
Here are the available seats for : The Act Of Valor
1 2 3 4 5 6 7 8 9
1 X X X X X X X X X
2 X X X X X X X X X
3 X X X T X X X X X
4 X X X X X X X X X
5 X X X X X T X X X
6 X X X X X X X X X
7 X X X X X X X X X
8 X X X X X X X X X
9 X X X X X X X X X
******************** SCREEN *********************
Another seat (y/n)?: y
y
Here are the available seats for : The Act Of Valor
1 2 3 4 5 6 7 8 9
1 X X X X X X X X X
2 X X X X X X X X X
3 X X X T X X X X X
4 X X X X X X X X X
5 X X X X X T X X X
6 X X X X X X X X X
7 X X X X X X X X X
8 X X X X X X X X X
9 X X X X X X X X X
******************** SCREEN *********************
Enter the rowcol of the seat to purchase
2
3
Your ticket is confirmed!
Here are the available seats for : The Act Of Valor
1 2 3 4 5 6 7 8 9
1 X X X X X X X X X
2 X X T X X X X X X
3 X X X T X X X X X
4 X X X X X X X X X
5 X X X X X T X X X
6 X X X X X X X X X
7 X X X X X X X X X
8 X X X X X X X X X
9 X X X X X X X X X
******************** SCREEN *********************
Another seat (y/n)?: y
y
Here are the available seats for : The Act Of Valor
1 2 3 4 5 6 7 8 9
1 X X X X X X X X X
2 X X T X X X X X X
3 X X X T X X X X X
4 X X X X X X X X X
5 X X X X X T X X X
6 X X X X X X X X X
7 X X X X X X X X X
8 X X X X X X X X X
9 X X X X X X X X X
******************** SCREEN *********************
Enter the rowcol of the seat to purchase
2
3
Sorry! That seat is already taken!
Please try again.
Here are the available seats for : The Act Of Valor
1 2 3 4 5 6 7 8 9
1 X X X X X X X X X
2 X X T X X X X X X
3 X X X T X X X X X
4 X X X X X X X X X
5 X X X X X T X X X
6 X X X X X X X X X
7 X X X X X X X X X
8 X X X X X X X X X
9 X X X X X X X X X
******************** SCREEN *********************
Another seat (y/n)?: y
y
Here are the available seats for : The Act Of Valor
1 2 3 4 5 6 7 8 9
1 X X X X X X X X X
2 X X T X X X X X X
3 X X X T X X X X X
4 X X X X X X X X X
5 X X X X X T X X X
6 X X X X X X X X X
7 X X X X X X X X X
8 X X X X X X X X X
9 X X X X X X X X X
******************** SCREEN *********************
Enter the rowcol of the seat to purchase
6
7
Your ticket is confirmed!
Here are the available seats for : The Act Of Valor
1 2 3 4 5 6 7 8 9
1 X X X X X X X X X
2 X X T X X X X X X
3 X X X T X X X X X
4 X X X X X X X X X
5 X X X X X T X X X
6 X X X X X X T X X
7 X X X X X X X X X
8 X X X X X X X X X
9 X X X X X X X X X
******************** SCREEN *********************
Another seat (y/n)?: y
n
You ordered 4 tickets for The Act Of Valor at 9:00pm.
Your total today is: $ 42.0

public class Movie { public String name; public double price; public String showtime; public final int SIZE = 9; public int ticketsSold; public String[][] seats = new String[SIZE][SIZE); * Assigns the value of "x" to each * seat in the seats array public void initializeSeats() { for(int i=@;i<SIZE;i++){ for(int j=0; j<SIZE;j++){ seats[i][j]="X"; //initialize as empty seat, * Prints out information about the movie * in the format * Ticket Price: $ * Show time: * Note that there are no * The < mean fill in here around the output public void printMoviestats() { * print movie stats here */ System.out.println(" "+this.name); System.out.println("Ticket Price : $ "+this.price); System.out.println("Show time : "+this.showtime); * Prints out the seats array to the console * with row and column numbers * and with the placement of the SCREEN in * row 10 * Along with the message "Here are the * available seats for :" * Note that there are no <> around the output

public void printseatingchart() { /* print seating arrangement here */ System.out.println("Here are the available seats for : *+this.name); System.out.print(" "); for(int i=1;i<=9;i++) System.out.print(i+" "); System.out.println(""); for(int i=@;i<SIZE;i++) { System.out.print(""+(i+1)); for(int j=e;j<SIZE;j++){ System.out.print(" "+seats[i][j]); System.out.println(""); System.out.println("**************888*** SCREEN ****

import java.util.Scanner; public class Theater { public static void main(String[] args) { String choice; Scanner input = new Scanner(System.in); /* INITIALIZE MOVIE OBJECTS HERE */ Movie starWars = new Movie(); Movie bond=new Movie(); Movie valor=new Movie(); /* DETAILS OF 3 MOVIES */ starwars.name = "Star Wars: The Rise of Skywalker"; // set name starwars.price = 10.50; //set price starwars.ticketssold = @; //set price starwars. showTime = "9:00pm"; // set time starwars.initializeseats(); //initialize seating arrangement bond.name = "Skyfall - James Bond"; bond.price = 10.5e; bond.ticketssold = 0; bond.showtime = "9:00pm"; bond.initializeSeats(); valor.name = "The Act of valor"; valor.price = 10.50; valor.ticketssold = 0; valor.showtime = "9:00pm"; valor.initializeseats(); // Add two more movie objects here - movies of your choice! System.out.println("Welcome to the CineBucks Movie Theater!! System.out.println("\nBelow are our current movies and showtimes: \n"); starwars.printMoviestats(); // print movie stats bond.printMoviestats(); valor.printMoviestats();

System.out.println("Enter the name of the movie: "); choice input.nextLine(); // get the name of movie here if(choice.equalsIgnorecase(starwars.name)){ // if movie is starwars menuItem(starwars, input); 7/call to function here }else if (choice.equalsignorecase(bond.name)){ / if movie is james bond, menuitem(bond, input); }else if (choice.equalsignorecase(valor.name)){ //if movie is valor menuItem(valor,input); input.close(); * This method is optional, but can be used * to avoid repetitive code for each movie * menu option * @param m the Movie object, for the movie selected by the user @param input the scanner object public static void menuItem(Movie m, Scanner input) { string y; int COUNT=0; do{ m.printSeatingchart(); System.out.println("Enter the rowcol of the seat to purchase"); int row=input.nextInt(); int col=input.nextInt(); if(m. seats[row-1][col-1).equals("T")){ //it it is already occupied system.out.println("Sorry! That seat is already taken!\n" + "Please try again."); }else{ m. seats[row-1 col-11:"1"; //occupy the seat here System.out.println("Your ticket is confirmed!"); COUNT+=1; //increment the counter m.printseatingchart(); //print seating chart here,

System.out.println("Another seat (y/n)?: y"); y=input.next(); // input for choice here }while(y.equals("/")); //iterate till user inputs 'n /* print the final result here */ System.out.println("You ordered "+COUNT+" tickets for "+m.name" at "m.showTime+".\n" + "Your total today is: $ "+(COUNT * m.price));

Add a comment
Know the answer?
Add Answer to:
Write in Java Movie Theater Ticket App Write a program that allows a user to purchase...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Using C not C++, Write a program that can be used by a small theater to...

    Using C not C++, Write a program that can be used by a small theater to sell tickets for performances. The theater’s auditorium has 15 rows of seats, with 30 seats in each row. The program should display a screen that shows which seats are available and which are taken. For example, the following screen shows a chart depicting each seat in the theater. Seats that are taken are represented by an * symbol, and seats that are available are...

  • Write a program in C to assign seats of a movie theater (capacity: 200 seats). Your...

    Write a program in C to assign seats of a movie theater (capacity: 200 seats). Your program should display the following menu of alternatives: Please type 1 for "section A, $50/ticket" type 2 for "section B, $70/ticket", and type 3 for "section C, $80/ticket".  If the user types 1, then your program should assign a seat in the A section (seats 1–50). If the user types 2, then your program should assign a seat in the B section (seats 51–100). If...

  • In C++. Write a program that can be used to assign seats for a commercial airplane...

    In C++. Write a program that can be used to assign seats for a commercial airplane and print out the ticket total. The airplane has 13 rows, with row 7 being the Emergency Exit row. Each row has 7 seats, there are two seats on each side of the plane and three seats in the middle with aisles on both sides. Rows 1 and 2 are considered first class with tickets for this specific  flight being $872.00 round trip. Rows 3...

  • Your assignment is to design a TicketManager class that can keep track of the number of...

    Your assignment is to design a TicketManager class that can keep track of the number of seats available in a theater’s auditorium. The TicketManager class should have a two-Dimensional array, which has 15 rows and 30 columns for all the seats available in the auditorium, also an array of double to keep track of the price of tickets for each row. Each row has a different price. Use the following UML diagram to design the class: -------------------------------------------------------------------- + NUMROWS :...

  • For c++ Write a program that can be used to assign seats for a commercial airplane....

    For c++ Write a program that can be used to assign seats for a commercial airplane. The airplane has 13 rows, with six seats in each row. Rows 1 and 2 are first class, rows 3 through 7 are business class, and rows 8 rows through 13 are economy class. Your program must prompt the user to enter the following information: Ticket type (first class, business class, or economy class) Desired seat a. b. Output the seating plan in the...

  • P7.5– A theater seating chart is implemented as a two-dimensional array of ticket prices, like this:...

    P7.5– A theater seating chart is implemented as a two-dimensional array of ticket prices, like this: 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 20 20 20 20 20 20 10 10 10 10 20 20 20 20 20 20 10 10 10 10 20 20 20 20 20 20 10 10 20 20 30 30...

  • Write pseudocode for a program where the seating map for a particular performance at a theater...

    Write pseudocode for a program where the seating map for a particular performance at a theater contains 70 rows of 100 seats each. Using an array where applicable, develop the pseudeocode for a program that allows a user to continuously enter each household size and then a) Allows a user to continuously enter a row number and seat number until they enter an appropriate sentinel value for the row number in order to stop entering input. Each time the user...

  • Monopoly: Fantastic Films is the only movie theater in an isolated town. The table below illustrates...

    Monopoly: Fantastic Films is the only movie theater in an isolated town. The table below illustrates the demand schedule for movie tickets and the cost schedule for producing the movies. Complete the table. Maximize your browser window to view all columns in the table. Price ($ per ticket) Quantity (tickets per show) Price ($ per ticket) Quantity (tickets per show) Total Revenue (dollars per show) Marginal Revenue Total Cost (dollars per show) Marginal Cost 20 0 1000 18 100 1600...

  • Can you help us!! Thank you! C++ Write a program that can be used by a...

    Can you help us!! Thank you! C++ Write a program that can be used by a small theater to sell tickets for performances. The program should display a screen that shows which seats are available and which are taken. Here is a list of tasks this program must perform • The theater's auditorium has 15 rows, with 30 seats in each row. A two dimensional array can be used to represent the seats. The seats array can be initialized with...

  • write a java program that displays the following: Write a Java program that prompts the user...

    write a java program that displays the following: Write a Java program that prompts the user to enter an integer and determines whether 1. it is divisible by 5 and 6, whether on 2. it is divisible by 5 or 6, 3. it is divisible by 5 or 6, but not both. Here is a sample run of this program: Sample run: Enter an integer: 10 Is 10 divisible by 5 and 6? false Is 10 divisible by 5 or...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT