Question 1 Create the Movie Class Movie Class Step 1: Create a class named Movie. Step...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Question 1 Create the Movie Class Movie Class Step 1: Create a class named "Movie". Step 2: Add the following attributes to the class: -String Name:Represents the name of the movie. String showtime: Indicates the time at which the movie is scheduled to be shown. int availableSeats Stores the number of available seats for the movie. 0.25 Points -double ticketPrice: Represents the price of a ticket for the movie. Step 3: Implement a constructor for the Movie class to initialize its attributes Step 4: Create a toString method that returns a string which should include the movie's name, showtime, available seats, and ticket price. Question 2 MyClass Class Complete the below program that implements a simple movie booking system. Table 1 shows the price of each seat type (Vi 2 Premium 3:Standard, 4Kids). Table 1-Types of Seats 1. SeatType 1.1 1. 2 1.3 1.4 import java.util. public class MyClass ( public static void main(String args[]) { // Declare an ArrayList of type Movie I 1. Cost 1. 100 1.80 1.60 2 OF 2 QUESTIONS REMAINING 0.75 Points 1.40 9:26 pm import java.util. public class MyClass ( public static void main(String args[]) { // Declare an ArrayList of type Movie // Initialize the ArrayList with 5 different movies with one of the movies // named "Oppenheimer" and "Dead" // Print the number of available seats for the movie named "Oppenheimer" // remove the movie named "Dead" // Display all movies information using a for-each loop // create a 2D-Array called seats based on the table shown in Table 1. // create a Scanner I 7 Prompt the user to select a seat type (VIP, Premium, Standard, Kida) System.out.print("Please enter the type of ticket (1:VIP 2: Premium 3:Standard 4: Kida"); // Prompt the user for the number of tickets they want to purchase System.out.print("How many tickets are you purchasing?"); // calculate the cost of the tickets double cost 777; // Loop through the seat types to find the cost cost // get the price of each ticket (as shown in the // table, column 2) and multiply by numbercfticket // Print the total cost 2 OF 2 QUESTIONS REMAINING Question 1 Create the Movie Class Movie Class Step 1: Create a class named "Movie". Step 2: Add the following attributes to the class: -String Name:Represents the name of the movie. String showtime: Indicates the time at which the movie is scheduled to be shown. int availableSeats Stores the number of available seats for the movie. 0.25 Points -double ticketPrice: Represents the price of a ticket for the movie. Step 3: Implement a constructor for the Movie class to initialize its attributes Step 4: Create a toString method that returns a string which should include the movie's name, showtime, available seats, and ticket price. Question 2 MyClass Class Complete the below program that implements a simple movie booking system. Table 1 shows the price of each seat type (Vi 2 Premium 3:Standard, 4Kids). Table 1-Types of Seats 1. SeatType 1.1 1. 2 1.3 1.4 import java.util. public class MyClass ( public static void main(String args[]) { // Declare an ArrayList of type Movie I 1. Cost 1. 100 1.80 1.60 2 OF 2 QUESTIONS REMAINING 0.75 Points 1.40 9:26 pm import java.util. public class MyClass ( public static void main(String args[]) { // Declare an ArrayList of type Movie // Initialize the ArrayList with 5 different movies with one of the movies // named "Oppenheimer" and "Dead" // Print the number of available seats for the movie named "Oppenheimer" // remove the movie named "Dead" // Display all movies information using a for-each loop // create a 2D-Array called seats based on the table shown in Table 1. // create a Scanner I 7 Prompt the user to select a seat type (VIP, Premium, Standard, Kida) System.out.print("Please enter the type of ticket (1:VIP 2: Premium 3:Standard 4: Kida"); // Prompt the user for the number of tickets they want to purchase System.out.print("How many tickets are you purchasing?"); // calculate the cost of the tickets double cost 777; // Loop through the seat types to find the cost cost // get the price of each ticket (as shown in the // table, column 2) and multiply by numbercfticket // Print the total cost 2 OF 2 QUESTIONS REMAINING
Expert Answer:
Answer rating: 100% (QA)
It appears that youve provided a series of screenshots related to a programming assignment involving the creation of a Movie class in Java and the imp... View the full answer
Related Book For
Posted Date:
Students also viewed these programming questions
-
Sue was required to sign an NDA when she took a job at her new company. Why did the company require her to sign it?
-
A snowboarder on a slope starts from rest and reaches a speed of 2.1 m/s after 9.2 s. (a) What is the magnitude (in m/s) of the snowboarder's average acceleration? (b) m/s How far (in m) does the...
-
This assignment reviews object-oriented programming concepts such as classes, methods, constructors, accessor methods, and access modifiers. It makes use of an array of objects as a class data...
-
Write an HTML document to create a form that collects favorite popular songs, including the name of the song, the composer, and the performing artist or group. This document must call one PHP script...
-
Which of the two musical notes displayed one at a time on an oscilloscope screen has the higher pitch?
-
An accelerometer attached to an object can be modeled as a mass-damper-spring system, as shown in Figure 5.122. Denote the displacement of the mass relative to the object, the absolute displacement...
-
Prove the relations (11.16), (11.18), and (11.21).
-
This is the trial balance of Solis Company on September 30. The October transactions were as follows. Oct.5.Received $1,300 in cash from customers for accounts receivable due. 10 Billed customers for...
-
You have been given the following information for an existing bond that provides coupon payments. Par Value: $2000 Coupon rate: 6% Maturity: 4 years Required rate of return: 6%. What is the...
-
You are called by the daughter of an elderly woman who lives alone. The daughter lives in another city and is concerned because her mother does not drive and has seemed unhappy and listless on the...
-
https: / / media . cheggcdn.com / media / 7 d 0 / 7 d 0 8 dbd 4 - b 0 c 3 - 4 2 0 1 - 8 5 1 e - 3 b 0 1 7 1 6 7 3 b 5 6 / phpIZHKk 5
-
Inputs for WACC (Re computed using CAPM only) LT Debt: 8000 bonds outstanding of a 5-year maturity; 1015 = PV; 4.2% = Coupon Rate (Semiannual) Common Stock: 35,000 shares outstanding; $28 price today...
-
If the hospital is currently using the direct method, do you think (based on the differences you see) that they should switch to the sequential method? Write up your recommendation to the management...
-
A couple who is very much in love decides to get married in 5 years; for which they need $ 12,000, both for the party and for their honeymoon. Both decide that each deposit $ 1,500 in a single bank,...
-
Price Company began construction of a new office building on January 1, 20x3. The building was finished and ready for use on November 30, 20x4. Expenditures on the project were as follows: January 1,...
-
Alexas Corporation reports the following: Earnings per share Dividends per share Book value per share - at end of the year Analysts' expected earnings for Alexas for next two years are: 2016: $2.00...
-
Lean Production Process Production Process or manufacturing process refers to methods and technologies to use raw materials and prepare finished goods ready for customer. But during this process,...
-
The manager of a local convenience store is expanding his line of small toy items. To price these new items, the manager is looking at the prices being charged by competing retailers in his area. For...
-
Dice are used in many games. One die can be thrown to randomly show a value from 1 through 6. Design a Die class that can hold an integer data field for a value (from 1 to 6). Include a constructor...
-
If total = 100 and amt = 200, then after the statement total += amt, ____________. a. total is equal to 200 b. total is equal to 300 c. amt is equal to 100 d. amt is equal to 300
-
You created a class called RandomGuess. In this game, the application generates a random number for a player to guess. Improved the application to display a message indicating whether the players...
-
Refer to the data in Exercise 13-15. Compute the following financial ratios for the year 2009: Data From Exercise 13-15 Comparative financial statements for the Rahul Corporation for the year ended...
-
To estimate the optimal mix of debt and equity for your firm and to evaluate the effect on firm value of moving to that mix. Key Questions Based on the cost of capital approach, what is the optimal...
-
To determine whether your firm should move to its optimal mix (and if so, how) and to analyze the right type of debt for your firm. Key Questions If your firms actual debt ratio is different from...
Study smarter with the SolutionInn App