Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Java Programming AP Computer Science Lab: Tickets Part 1: Write the following classes from the UMLs. See additional information below. Ticket (Italics = abstract) int
Java Programming
AP Computer Science Lab: Tickets Part 1: Write the following classes from the UMLs. See additional information below. Ticket (Italics = abstract) int num Tickets double price Ticket(int numin) int getNum Tickets() double getPrice) void setPrice(double priceln) String toString() The toString method returns num Tickets + "tickets". WalkUpTicket WalkUp Ticket(int numin) String toString() Advance Ticket static int days Advance Ticket(int numin, int daysIn) String toString() Student Adv Ticket StudentAdvTicket(int numin, int daysn) String toString() WalkUpTicket: Walk-up tickets are purchased the day of the event and cost $50. The toString method should return "num Tickets same-day tickets at $50 is Advance Ticket: 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. (Tickets purchased on the day of the event are Walk- up tickets.) The toString method should return "num Tickets advance tickets at $ is " StudentAdvTicket: Student advance tickets are sold at half the price of normal advance tickets: 10 or more days early are $15 and fewer than 10 days are $20. Same day student tickets are Walk-up tickets. The toString method should return the same information format as Advance Ticket, with the addition of "Student ID Required". (Use the parent toString() method.) *Have the constructors set the priceStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started