purple cow

I never saw a Purple Cow,
I never hope to see one;
But I can tell you, anyhow,
I'd rather see than be one.

Gelette Burgess, 1895

But a Purple Cow is just what you would expect to see as the mascot of the JMmoo Dairy Bar

CS 139 Algorithm Development
PA3: JMmoo Dairy Bar

Part A Due in Canvas by Friday,October 17 at 11:59PM

Part B Due in WebCAT by Wednesday, October 22 at 11:59 PM

  • -10% on Thursday October 23
  • -20% on Friday, October 24
  • -35% on Sunday, October 26
  • -50% on Monday, October 27
  • Not accepted afterwards
Part C due in Canvas by Thursday,October 23 or one day after you have successfully submitted to WebCAT.

Part D due in class on Friday, October 24 or one day after you have successfully submitted to WebCAT.
ice cream

Updates:

  1. 10/19/2014 - Changed the structure to say that the list of methods should be in JMmoo.java not JmmooDriver.java.
  2. 10/19/2014 - Changed the description of the calcPrice method to say it takes in 4 parameters as listed below.
  3. 10/19/2014 - Clarified that the calcPrice method returns a double value.
  4. 10/19/2014 - Clarified that it is okay to add methods to JMmoo.java and as a matter of fact, you should think carefully about what additional methods might be helpful (like checking for y/n values).

Objectives - At the conclusion of this assignment students will have demonstrated that they can:

Background

The JMU West Campus is jealous of the homemade ice cream at E-Hall. So in PC Dukes, there will be a new JMmoo Dairy Bar offering made to order homemade ice cream confections. Your job is to write the software application that will help the servers price the ice cream.

Requirements

PART A - Graded as a homework assignment. There will be a separate Canvas Assignment for this.

You will need to provide test cases that will show that you understand the different branches(alternatives) that will be used for pricing.

Pricing is calculated as follows:

There will always be a "special". That special is a flat $5.00. (For example, it might be a double scoop in a chocolate dipped sugar cone with sprinkles.)

A single scoop in a regular cone or dish is $1.00. A double scoop is $2.00. A triple scoop is $2.75.

A sugar cone adds $.50 to the cost of the confection. A waffle cone adds a dollar.

Sprinkles, nuts, chocolate coating each cost $.50 for a single scoop, $.75 for a double or triple.

PART B - Submitted to webcat. 

You will write a Java program consisting of JMmooDriver.java and JMmoo.java, that must:

<blank>
Your ice cream costs $xxx.xx. 

This line must end with the new line character. The format of the amount is the same as for PA2.

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)

Welcome to the JMmoo Dairy Bar
<blank>
Do you want the special? n
How many scoops? 1
What kind of cone (r-regular, s-sugar, w-waffle)? r
Do you want sprinkles? n
Do you want nuts? n
Do you want chocolate coating? n
			Note, this blank line is in the dialog because it would be the return from entering n.
<blank>
Your ice cream costs $  1.00.

NOTES:

  1. There will be only four new line characters in the output...one for the welcome, one for the blank line after the welcome, one for the blank line beneath the user entry, and one to close out the last line of output.
  2. Your program should use appropriate data types for the values being input and calculated, and appropriate and meaningful names for all variables and constants. The program source must follow all StyleGuide conventions used in this class.

Part B Structure

JMmooDriver will contain a single method, main which will call all of the other methods in JMmoo to perform the calculations and output the results. Nothing should be directly output in JMmooDriver.

JMmoo will have the following methods:

You will likely want to add additional methods to JMmoo.java.

Part B Deliverables

  1. Zip your JMmooDriver.java and JMmoo.java into a zip file. Submit the zip file via Web-CAT (http://webcat.cs.jmu.edu).
  2. Your program will be judged on correctness (80%) and conformance to the StyleGuide (20%). The checkoff chart is found here. Deductions for failing to follow the structure will be taken from the 80% correctness score.

Part C, D - Reflection and Pair Programming Log - graded as regular homework assignments. There will be separate Canvas Assignments for this.

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.

Honor Code

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.