DASC 1204 – Programming Project 2 Due Date – 02/07/2022 at 11:59pm 1. Problem Statement: The purpose of this programming assignment is to give students experience with input/output commands and conditional statements in Java. Your task is to implement the user interface for customers at “John’s Restaurant.” Instead of listing food items on their menu, the chef asks each customer about their budget and food preferences. Using this information, the restaurant will cook and deliver a unique meal for each customer. User Input Your first task is to ask the user a series of questions to find out what types of food they like and dislike. In particular, you should ask the user the following questions and save their answers. • How much do you like meat on scale of 1..100? • How much do you like vegetables on a scale of 1..100? • How much do you like pasta on a scale of 1..100? • How much do you like potatoes on a scale of 1..100? • How much do you like chocolate on a scale of 1..100? • How much do you like fruit on a scale of 1..100? • What is your budget (before tax) for this meal? Choosing the Appetizer Your next task is to use the information above to decide which appetizer to make for the customer. The three appetizer options are: • Chicken wings (prefers meat) • Garden salad (prefers vegetables) • Garlic bread (does not like meat or vegetables) If the before tax budget is under $15 the customer should not get an appetizer. To select which appetizer to cook, the chef compares the meat and vegetable preferences. If they are both small (under 20) the customer will get Garlic bread. If the meat score is greater than the vegetable score, the customer will get Chicken wings. Otherwise they will get a Garden salad. Choosing the Main Course Your next task is to use the information above to decide which main course to make for the customer. The four main course options are: • Steak and baked potato (prefers meat and potatoes) • Spaghetti and meat sauce (prefers meat and pasta) • Pasta primavera (prefers vegetables) • Cheese omelet (does not like meat, vegetables, potatoes, or pasta) If the before tax budget is under $10 the customer should not get a main course. To select which main course to cook, the chef compares the meat, vegetable, pasta and potato preferences. If all four are very small (under 10) the customer will get a Cheese omelet. If the customer prefers meat over vegetables, they will either Steak or Spaghetti depending on their potato/pasta preference. If the customer prefers vegetables over meat, they will get Pasta primavera. Choosing the Dessert Your next task is to use the information above to decide which dessert to make for the customer. The three dessert options are: • Chocolate cake (prefers chocolate) • Apple pie (prefers fruit) • Vanilla ice cream (does not like chocolate or fruit) If the before tax budget is under $20 the customer should not get a dessert. To select which dessert to prepare, the chef compares the chocolate and fruit preferences. If both are small (under 20) the customer will Vanilla ice cream. If the chocolate score is greater than the fruit score, the customer will get Chocolate cake. Otherwise they will get an Apple pie. Program Output Your final task is to print out the list of food items automatically selected by the chef for the customer and calculate and print the bill for the meal. Each appetizer costs $5, each main course costs $10, and each dessert costs $5. After you total these items, you should add 7% sales tax to get the final amount owed for the meal. 2. Design: Your first design task is to decide what messages to print for the user, and how to read and store their answers in variables. If the user input is out of the specified range, you should “correct” the value for the user and proceed. For example, if one of the customer’s preferences is less than 1, you should set the value to 1. Your next design task is to work out what sequence of nested if-else statements are needed to select the appetizer, main course, and dessert options based on the customer preferences. You may want to work out the logic for the appetizer or dessert first, and once you have that figured out, work on the logic for the main course. Your final design task is to decide how to print the list of food items and the bill for the meal. In order to do this, you may need to create some additional variables that keep track of the food choices and costs for each food item the chef selects. 3. Implementation: Since you are starting with a "blank piece of paper" to implement this project, it is very important to develop your code incrementally writing comments, adding code, compiling, debugging, a little bit at a time. This way, you always have a program that "does something" even if it is not complete. As a first step, it is always a good idea to start with an empty main function and add the code to read input data from the user, and then simply print these values back out again. Once this part is working, you can start performing calculations with the input data. 4. Testing: Test your program to check that it operates correctly for all requirements listed above. To verify that you are calculating the output values correctly, you should try a variety of input values and check your answers by hand. You should SAVE your program output to include in your project report. You are not required to add error checking for invalid inputs in this program, but it is always good to test a program to see what happens to your program if the user inputs unexpected data (like a negative number or “hello mom”). You should cut/paste these results into your project report to document what your program does in these cases. 5. Documentation: When you have completed your Java program, write a short report using the “Programming Project Report Template” describing what the objectives were, what you did, and the status of the program. Does it work properly for all test cases? Are there any known problems? Save this project report in a separate document to be submitted electronically. 6. Project Submission: When you have your midpoint code ready to submit, go to the Blackboard project description page and submit your program (as a .java file). You do not need to upload project documentation for the midpoint. When you have completed the programming project, upload your final program (as a .java file) and your project documentation (as a .docx or .pdf file). The dates on your electronic submission will be used to verify that you met the due date above. All late projects will receive reduced credit: 10% off if less than 1 day late, 20% off if less than 2 days late, 30% off if less than 3 days late, no credit if more than 3 days late. You will receive partial credit for all programs that compile even if they do not meet all program requirements, so handing projects in on time is highly recommended. 7. Academic Honesty Statement: Students are expected to submit their own work on all programming projects, unless group projects have been explicitly assigned. Students are NOT allowed to distribute code to each other or copy code from another individual or website. Students ARE allowed to use any materials on the class website, or in the textbook, or ask the instructor and/or GTAs for assistance. This course will be using highly effective program comparison software to calculate the similarity of all programs to each other, and to homework assignments from previous semesters. Please do not be tempted to plagiarize from another student. Violations of the policies above will be reported to the provost’s office and may result in a ZERO on the programming project, an F in the class, or suspension from the university, depending on the severity of the violation and any history of prior violations.