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, 21.06.2019 12:30
Svieta is making a chart of the hours that different employees have put into a team project at work. what formula would autosum most likely generate if added into b8?
Answers: 1
question
Computers and Technology, 22.06.2019 03:30
Identify at least three types of characteristics that you were asked about as you the computer identify a fruit.
Answers: 3
question
Computers and Technology, 22.06.2019 08:00
What is the algorithm for building a binary tree program
Answers: 2
question
Computers and Technology, 22.06.2019 14:20
Cengagenowv2 is a comprehensive online learning tool. using cengagenowv2, you may access all of the following except: 2. each time you log in, cengagenowv2 automatically performs a system check and informs you if your computer does not meet the cengagenowv2 system requirements. 3. which tab/page allows you to easily track your assignment scores, number of submissions, time spent, as well as the ability view assign
Answers: 3
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
question
Physics, 11.01.2021 15:30
Questions on the website: 13722367