Question: The visitorpackage is done, please help with the visitor class, the output should be the same as the example output but replace by mickey, donald,

The visitorpackage is done, please help with the visitor class, the output should be the same as the example output but replace by mickey, donald, minnie , goofey, harry, ron hermione
Please follow the coding instruction
 The visitorpackage is done, please help with the visitor class, the
output should be the same as the example output but replace by
mickey, donald, minnie , goofey, harry, ron hermione Please follow the coding
instruction Coding instructions primitives using the rravs of objects as opposed to

Coding instructions primitives using the rravs of objects as opposed to o create two arrays of a "class type" (these are a declaration visitorPackage hich will have four (4) attendees Disney The r ticket price is STS pet for children and -E for everyone else regula visitor types are "s" for seniors, c" get a discount of $30 (everyone Seniors get a di of s10 and children else does not get a discount weekend for the instance va Hint use the strings weekday or nt for weekdays Mickey is a senior and going on a weekday is a child and going on a weekday senior or a and is going on a weekend Minnie is neither a weekend senior or a child and is going on a 4. Goofey s neither a Universal Studios, which will have three (3) attendees The ticket price is S60 per person visitor types are "s" for seniors, "c" for children and "E" for everyone else Seniors get a discount of s15 and children get a discount of s2s (everyone else does not get a discount) There is a 10% discount for weekdays (Hint: use the strings weekday or weekend for the instance variable) 1. Harry is a child and going on a weekend Hermione is a senior on a weekend 3. Ron is neither a senior or a child and is going on a weekday The program steps are attendees Declare and initialize the variable totalcost for the total amount for the park will make on the For the Disneyland array 4 instances of the 1. Create an array object called Disneyland that will hold 2. create the instances in the array for the four attendees (no need to use a for loop) 3. write a for loop for each array element instance that wi a. Call the method applyDiscount which will calculate the senior/child discount Pass the child discount value as the second parameter Pass the senior discount value as the third parameter b. Call the method applyWeekdayRate to calculate the weekday discount. Pass the array element instance as the first parameter Pass the percent discount value as the second parameter c. Call the method printInfo out the information for each of the attendees Pass the array element instance as the parameter d. Accumulate the total cost of the tour that the park will be earn for all of the attendees e. After the loop completes, output the total cost of the tour For the Universal Studios array 1. create an array object called Universalstudios that will hold 3 instances of the class visitorpackage 2. Create the instances in the array for the three attendees (no need to use a for loop) 3. Repeat the for loop you wrote above for Disneyland 4. Don't forget to reinitialize the totaloost variable for all park attendees Coding instructions primitives using the rravs of objects as opposed to o create two arrays of a "class type" (these are a declaration visitorPackage hich will have four (4) attendees Disney The r ticket price is STS pet for children and -E for everyone else regula visitor types are "s" for seniors, c" get a discount of $30 (everyone Seniors get a di of s10 and children else does not get a discount weekend for the instance va Hint use the strings weekday or nt for weekdays Mickey is a senior and going on a weekday is a child and going on a weekday senior or a and is going on a weekend Minnie is neither a weekend senior or a child and is going on a 4. Goofey s neither a Universal Studios, which will have three (3) attendees The ticket price is S60 per person visitor types are "s" for seniors, "c" for children and "E" for everyone else Seniors get a discount of s15 and children get a discount of s2s (everyone else does not get a discount) There is a 10% discount for weekdays (Hint: use the strings weekday or weekend for the instance variable) 1. Harry is a child and going on a weekend Hermione is a senior on a weekend 3. Ron is neither a senior or a child and is going on a weekday The program steps are attendees Declare and initialize the variable totalcost for the total amount for the park will make on the For the Disneyland array 4 instances of the 1. Create an array object called Disneyland that will hold 2. create the instances in the array for the four attendees (no need to use a for loop) 3. write a for loop for each array element instance that wi a. Call the method applyDiscount which will calculate the senior/child discount Pass the child discount value as the second parameter Pass the senior discount value as the third parameter b. Call the method applyWeekdayRate to calculate the weekday discount. Pass the array element instance as the first parameter Pass the percent discount value as the second parameter c. Call the method printInfo out the information for each of the attendees Pass the array element instance as the parameter d. Accumulate the total cost of the tour that the park will be earn for all of the attendees e. After the loop completes, output the total cost of the tour For the Universal Studios array 1. create an array object called Universalstudios that will hold 3 instances of the class visitorpackage 2. Create the instances in the array for the three attendees (no need to use a for loop) 3. Repeat the for loop you wrote above for Disneyland 4. Don't forget to reinitialize the totaloost variable for all park attendees

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!