fd
Programming Project 2 (revision 1.1) In this programming project, you will write a program to calculate and print the prices for an order of theater tickets. There is only one program file for this project. Your file must start with the two beginning comment blocks as specified in the coding guidelines for this course. The program and each method should be well commented and use meaningful variable names that follow the Java naming conventions. These items will be scored. Submit a compressed .zip archive of your program .java file, your separate test data table, and a screenshot of the program output for three test cases. The Program Write a program to calculate and display price information for a theater with the following ticket prices: • Adults $8.00 • Seniors $6.00 • Students $5.00 The theater also has two discounts available, a group discount and a school discount. • Group discount: If the total number of adult and senior tickets is ten or more, the entire order receives a 10% discount. • School discount: If the total number of student tickets is 25 or more, the entire order receives a 15% discount. • An order can only receive one discount. If eligible for both, only the school discount will be applied. Prices are also subject to 8.75% sales tax, applied after any discounts. Your program should: 1. In the main method, display a welcome message of your choice and then ask the user for a name, show date, and number of adult, senior, and student tickets. 2. Send the number of each ticket type to a calcPrice method. 3. In calcPrice, print a reservation summary that includes the number of each type of ticket, a subtotal before any discount, the group discount, the school discount, the tax, and a total. See the example below. Only display the discount lines and discount subtotal if the discount applies. 4. Return to the main method and print the customer’s name and show date. Sample output (user input in bold): Welcome to the Redbird Theater! Order tickets here. Enter your name: Randall Munroe Enter the date of the show: September 28 How many adult tickets would you like? 4 How many senior tickets would you like? 1 How many student tickets would you like? 30 Reservation Summary: Adult tickets: 4 @ $8.00 Senior tickets: 1 @ $6.00 Student tickets: 30 @ $5.00 Subtotal: $ 188.00 15% school discount: $ -28.20 Discounted subtotal: $ 159.80 Tax: $ 13.98 Total: $ 173.78 Tickets will be available for pickup at the box office on September 28 for Randall Munroe In a separate document, create a table showing three sets of test data that include sample inputs and expected outputs. Include one test with a single discount, one with no discounts, and one with both discounts. (See the example below.) Run your program with each set of test data. Include screenshot(s) of the output. Test 1 Test 2 Test 3 Name Randall Munroe Show Date September 28 # adult 4 # senior 1 # student 30 Subtotal 188.00 Group discount X Student discount -28.20 Discounted subtotal 159.80 Tax 13.98 Total 173.78 IT 168 Project 2 Grading Rubric Base Grade 90% • Includes all program structure needed to complete the assignment with no logical errors • Has meaningful and conventional names for all variables and methods • Produces output completely matching the project specification 80% • Incudes all program structure needed to complete the assignment, possibly with some logical errors • Has meaningful and conventional names for most variables and methods • Produces output matching the project specification with one or fewer errors or omissions. 70% • Successfully accomplishes some program steps needed to complete the project. • Uses appropriate variables, operations, and classes. • Produces at least some output meeting the project requirements. 60% • Is a recognizable attempt to meet the project requirements. • Includes variables, operations, and classes that relate to the project requirements. • Compiles and runs. Point Adjustments Deductions Additions -10 -10 -5 -5 -3 ea. -3 ea. -3 ea. -1 ea. Compiler error Has no commenting Runtime error Unnecessary code duplication Math/value error Incorrect variable type Variable when constant indicated Naming convention violation +5 +5 All test cases produce correct output Meets full formatting requirements (header comments, braces, indentation)