subject

Each ticket has a unique number and a price. There are three types of tickets: walk-up tickets, advance tickets, and student advance tickets. Walk-up tickets are purchased the day of the event and cost $50. Advance tickets purchased 10 or more days before the event cost $30, and advance tickets purchased fewer than 10 days before the event cost $40. Student advance tickets are sold at half the price of normal advance tickets: When they are purchased 10 or more days early they cost $15, and when they are purchased fewer than 10 days early they cost $20. Implement a class called Ticket that will serve as the superclass for all three types of tickets. Define all common operations in this class, and specify all differing operations in such a way that every subclass must implement them. No actual objects of type Ticket will be created: Each actual ticket will be an object of a subclass type. Define the following operations: The ability to construct a ticket by number. The ability to ask for a ticket's price. The ability to println a ticket object as a String. An example String would be "Number: 17, Price: 50.0".

a. Implement a class called WalkupTicket to represent a walk-up event ticket. Walk-up tickets are also constructed by number, and they have a price of $50.
b. Implement a class called AdvanceTicket to represent tickets purchased in advance. An advance ticket is constructed with a ticket number and with the number of days in advance that the ticket was purchased. Advance tickets purchased 10 or more days before the event cost $30, and advance tickets purchased fewer than 10 days before the event cost $40.
c. Implement a class called StudentAdvanceTicket to represent tickets purchased in advance by students. A student advance ticket is constructed with a ticket number and with the number of days in advance that the ticket was purchased. Student advance tickets purchased 10 or more days before the event cost $15, and student.

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 06:00
The width of a piece of rectangular land is 5m shorter rhan 1/3 of its length .find the width of the land if the length is 60m,150m.
Answers: 1
question
Computers and Technology, 23.06.2019 01:30
Which tab is used to change the theme of a photo album slide show? a. design b. view c. transitions d. home
Answers: 1
question
Computers and Technology, 23.06.2019 07:30
What key should you press and hold to select and open multiple files at one time? enter alt control esc
Answers: 1
question
Computers and Technology, 24.06.2019 18:30
Dereck works for long hours on his computer.  he frequently experiences physical strain by the end of the day because he does not follow an important rule of ergonomics with respect to the use of keyboards.  which of the following actions of dereck could lead to physical strain? a.  placing the keyboard exactly in front of him while typingb.  keeping hands and wrists straight while typingc.  using wrist pads throughout the dayd.  pounding at the keys on the keyboard while typinge.  resting his hands on the keyboard when he is not typing
Answers: 1
You know the right answer?
Each ticket has a unique number and a price. There are three types of tickets: walk-up tickets, adva...
Questions
Questions on the website: 13722361