java

profilekabbu
ITP120ProgrammingAssignmentSkiPasses7.pdf

ITP 120 Programming Assignment 1 Fall 2020 87 POINTS

The chart below lists the 2020 season passes for skiers at the Massanutten Ski Resort theme park in Massanutten, VA. You must write a program that calculates the season ticket price for a customer who may be purchasing as an individual or for a family. First, you must ask the customer for their last name as input into the program. Then, you must ask the user if they are purchasing a Family Pass or Individual Pass. If they are purchasing a Family Pass, then you need to display the menu options for purchasing a Special Value Pass for Family of 4 or Full Season Pass for Family of 4. If they are purchasing an Individual Pass, then you need to display the menu options for purchasing a Special Value Pass or Full Season Pass or Student Full Season Pass. After the pass is chosen by the user, you will need to ask the customer if they are active duty military or a veteran since a military discount will be given for 10% off of any pass purchased. You will need to calculate the military discount amount for those receiving it. You will need to calculate the Final Price by taking the price for the pass that the customer has chosen less the military discount amount. Display details to the customer that include the customer name, pass purchased, pass price, military discount amount given if any, and the final price. See the test cases below to see the exact order of menus to use when writing the program. You will need to format monetary amounts with 2 decimal places. This requires use of the printf command to create the columns and control decimal places. You must ensure that if the user enters lower case or upper case responses, that your decision structures will process the customer correctly. You must use a char data types and string data types in the menus as shown.

Below is a sample of how the program should run including test cases for each type of pass but this does not include all possible test cases. Remember that your program should work for any customer and not just the test cases shown. If you give me code that says if (name == “Mickey Mouse”) and then sets the price etc., you are not using an approach that will work for all customers. If you submit code that has syntax errors in it that I have to debug, you will receive a grade that is no more than 43.5 points and likely much less. TEST CASE 1: Welcome to Massanutten Ski Resort! Skiing...a sport made for social distancing. Please enter your last name: Mickey Mouse Please enter the type of pass you want to purchase: I for Individual F for Family

I Please choose from the following individual passes. SV: Special Value Pass. FS: Full Season Pass. SFS: Student Full Season Pass. SV Are you active duty military or a veteran (Yes or No)? Yes Name: Mickey Mouse Pass Purchased: Special Value Pass Pass Price: 334.00 Military Discount: 33.40 Final Price: 300.60 Thanks for skiing at Massanutten Ski Resorts. Now DON'T break a leg! TEST CASE 2: Welcome to Massanutten Ski Resort! Skiing...a sport made for social distancing. Please enter your last name: Minnie Mouse Plese enter the type of pass you want to purchase: I for Individual F for Family I Please choose from the following individual passes. SV: Special Value Pass. FS: Full Season Pass. SFS: Student Full Season Pass. fs Are you active duty military or a veteran (Yes or No)? No Name: Minnie Mouse Pass Purchased: Full Season Pass Pass Price: 478.00 Military Discount: 0.00 Final Price: 478.00 Thanks for skiing at Massanutten Ski Resorts. Now DON'T break a leg!  ----jGRASP: operation complete.

TEST CASE 3:

Welcome to Massanutten Ski Resort! Skiing...a sport made for social distancing. Please enter your last name: Goofy Please enter the type of pass you want to purchase: I for Individual F for Family I Please choose from the following individual passes. SV: Special Value Pass. FS: Full Season Pass. SFS: Student Full Season Pass. SFS Are you active duty military or a veteran (Yes or No)?

NO Name: Goofy Pass Purchased: Student Full Season Pass Pass Price: 410.00 Military Discount: 0.00 Final Price: 410.00 Thanks for skiing at Massanutten Ski Resorts. Now DON'T break a leg!  ----jGRASP: operation complete.

TEST CASE 4:

Welcome to Massanutten Ski Resort! Skiing...a sport made for social distancing. Please enter your last name: Donald Duck Please enter the type of pass you want to purchase: I for Individual F for Family F Please choose from the following family passes. SVF: Special Value Pass for Family of 4. FSF: Full Season Pass for Family of 4. SVF Are you active duty military or a veteran (Yes or No)? Yes Name: Donald Duck Pass Purchased: Special Value Pass for Family of 4 Pass Price: 1200.00 Military Discount: 120.00 Final Price: 1080.00 Thanks for skiing at Massanutten Ski Resorts. Now DON'T break a leg!  ----jGRASP: operation complete.

TEST CASE 5: Welcome to Massanutten Ski Resort!

Skiing...a sport made for social distancing. Please enter your last name: Daisy Duck Plese enter the type of pass you want to purchase: I for Individual F for Family F Please choose from the following family passes. SVF: Special Value Pass for Family of 4. FSF: Full Season Pass for Family of 4. fsf Are you active duty military or a veteran (Yes or No)? no Name: Daisy Duck Pass Purchased: Full Season Pass for Family of 4. Pass Price: 1640.00 Military Discount: 0.00 Final Price: 1640.00 Thanks for skiing at Massanutten Ski Resorts. Now DON'T break a leg!