Question: Write a Java program named Disney.java. We will redo the program, but this time we will use a blueprint and driver. Look at the UML
Write a Java program named Disney.java. We will redo the program, but this time we will use a blueprint and driver. Look at the UML diagram below. Note there is are methods for calculating the cost for just the adults, the cost for just the kids, and then the total cost of both. We need to take small steps when writing methods . NOTE: You do not have to code the no-argument constructor in this driver or any driver that you write. This is for Javas use.
Complete the blueprint for DisneyTicket.java. Then write a DisneyDriver.java that creates the following two objects
Then have your program print out the toString(), something like
You purchased 2 adult tickets costing $142.00 each for a total of $284.00
You purchased 4 kids tickets costing $110.00 each for a total of $440.00
The total purchase price was $724.00
You purchased 1 adult tickets costing $185.00 each for a total of $185.00
You purchased 5 kids tickets costing $120.00 each for a total of $600.00
The total purchase price was $785.00
> DisneyDriver itp 120mod3ANSWERS_20_21 Disney Driver main(String[]):void > Disney Tickets itp 120mod3ANSWERS_20_21 a numAdults: int costAdult: double numKids: int costid: double DisneyTickets() DisneyTickets(int, double,int, double) toString():String adultTotal():double kidTotal().double total():double getNumAdults():int setNumAdults(int):void getCostAdult().double setCostAdult(double):void getNumKids():int setNumKids(int):void getCostKid():double setCostKid(double):void #adult tickets 2 1 Cost each $142.00 $185.00 #child tickets 4 5 Cost each $110.00 $120.00
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
