![]() |
CS 139
Algorithm Development
Part A Due in Canvas by Wednesday, Sept 17 at 11:59PM Part B Due in WebCAT by Wednesday, Sept 24 at 11:59 PM
Part D due in class on Thursday, Sept 25 or one day after you have successfully submitted to WebCAT. |
![]() |
---|
UPDATES: 9/22/2014 - Changed the prompt for the meal amount to "How much was the total bill? " due to inconsistency in how that was shown in the PA.
9/23/2024 - Changed the output in both areas to be consistent. The server line was missing in the first output example.
When dining in a restaurant, patrons are presented with a check for their meal. In this application you will calculate the tax and suggested gratuities for a meal. This application will require you to produce a "check" like you might get in a restaurant.
You will provide 3 examples of different values that will be used for your testing. These examples should include the the amount of the bill and the resulting tax, 15% gratuity, 18% gratuity, and 20% gratuity. Part A will be in the form of a quiz and will have some additional questions. You must finish PART A before you can get help with PART B as you should always think through a problem before you attempt to solve it.
You will write a single Java program, BillMaker.java, that must:
<blank>
Total bill: $ 88.00
Tax: $ 10.38
You owe: $ 98.38
<blank> Your server was kelly.
Tip 15%: $ 13.20
Tip 18%: $ 15.84
Tip 20%: $ 17.60
<blank>
Thank you for dining with us.
Output MUST conform exactly to that shown. Failure to match it exactly will result in WebCAT errors. Each line above must end with the new line character directly following the output value and the blank lines <blank> in the output are significant. These lines should not include a blank space character, but should include a single new line character.
A complete dialog (with input values highlighted in red would look like)
How much was the total bill? 100 Who was the server? kelly <blank> Total bill: $100.00 Tax: $ 11.80 You owe: $111.80 <blank> Your server was kelly. Tip 15%: $ 15.00 Tip 18%: $ 18.00 Tip 20%: $ 20.00 <blank> Thank you for dining with us.
NOTES:
You will write a reflection document for this assignment which will let you consider the process of building this program. It will also contain a place to critique this assignment for this class.
In addition, you should keep a log showing how much time you and your partner worked together and how much time you worked alone.
This is a pair programming assignment. You may work with your partner, but may not work with any other team. This assignment should be viewed as a take home exam. Your work on the assignment and your submission must conform to the JMU Honor Code. Authorized help is limited to the classroom handouts, lab material, the TAs for any CS139 or CS 149 section, and either professor. Copying work from another student not in your partnership or the Internet is an honor code violation, which will result in a zero on the assignment and possibly further sanctions. Your work on this assignment is subject to review by MOSS which is a plagiarism detection tool for programs. Submission to WebCAT constitutes your submission of work for academic credit and your agreement that your work may be submitted to MOSS.