Flying-Disco Shop
(make it simple im a college student, the class is Procedural Programming)
CSL255Procedural Programming (Tues/Thurs, 2021 Springl / 04C: Flying-Disc Shop OPEN OPEN DATE 1/18/2021 12:01 PM DUE DATE 2/4/2021 11:59 PM SUBMISSIONS Unlimited GRADING STRATEGY Best Submission HIGHEST SUBMISSION Submit Project DESCRIPTION The local flying-disc shop sells premium disc-golf and ultimate (Frisbee) discs. The disc-golf discs retail for $14.96 and the ultimate discs retail for $20.96 each Quantity discounts are given as follows Number of Discs Discount 5-98% 10 - 19 16% 20-29 24% 30 or more 32% Write a program that asks the cashier if the customer wishes to purchase disc-golf or ultimate discs The cashier enters a' or 'U for ultimate and or 'Gfor disc golf, all other input output the error message, "invalid disc type exit the program (Use a switch statement to check the user's input and use return 0; in the switch statement to end the program). It the input was valid, the program should then prompts the user for the number of discs. If the number is positive, the program displays the disc type, quantity, price per disc (after any discount), the total savings, and total price (with exactly 2 decimal places). Otherwise, the program displays the error message, "X is an invalid number of discs" (where X is the number the user inputted), in your implementation, avoid duplicating your code, arrange the program logic so that no statements are repeated. Hint a single string variable is useful to hold either ultimate Disc" or "oisc Golf Disc"Also, define and use constants for the retail priceste.DISC_GOLF_RETAIL, ULTIMATE RETAILI You may use additional constants if you choose Sample Output (user Input is in yellow) all other input output the error message, "invalid disc type." exit program (Use a switch statement to check the user's input and use return 0; in the switch statement to end the program.) If the input was valid, the program should then prompts the user for the number of discs. If the number positive, the program displays the disc type, quantity, price per disc (after any discount), the total savings, and tota price (with exactly 2 decimal places) Otherwise, the program displays the error message, "X is an invalid number o discs" (where X is the number the user inputted). In your implementation, avoid duplicating your code, arrange the program logic so that no statements are repeated. Hint a single string variable is useful to hold either "ultimate Disc" or "Disc-golf Disc") Also, define and use constants for the retail prices (ie, DISC_GOLF_RETAIL, ULTIMATE RETAIL) You may use additional constants if you choose Sample Output (user input is in yellow) welcome to the Flying-Disc Shop! Enter 'u' for ultimate discs and 'e' for disc golf: U Enter the number of Ultimate Disc(s): 100 --Receipt --- Disc Type: Ultimate Disc Quantity: 100 Price per Disc: $ 14.25 Total Savings: $ -670.72 Total: $ 1425.28 Sample Output (user input is in yellow) welcome to the Flying-Disc Shop! Enter *u* for ultimate discs and 'B' for disc golf: 8 Enter the number of Disc-golf Disc(s): . e is an invalid number of discs. Submit only your file named FlyingDiscs.cpp