Question: Please help me understand this past exercise I had to do last year. The step by step explanation. Problem Description A programming company you are

Please help me understand this past exercise I had to do last year. The step by step explanation.
Problem Description
"A programming company you are working for is developing a software for bulk food retailer and has designed simple UML
class diagrams for a variety of food items. You have been provided with a detailed UML class diagram for class Potato, as
well as pseudocodes and flowcharts for sample class Potato methods, then you have to create a working-class Potato as a
Java program using a provided testing harness pseudocode."
Please see the In-Lab Exercise 03 companion file for the UML diagram of class Potato, as well as the provided pseudocodes,
and flowcharts.
Task 1- Java Program: Translate the Algorithm into Java
Create an In-Lab Exercise 03 project in Eclipse and add the two incomplete classes, Exercise03 and Potato. Please see
the starter Java files Exercise03.java and Potato.java.
Follow the provided UML class diagram, pseudocode and flowchart(s) and to complete the code for class Potato.
Follow the provided pseudocode and flowchart to complete the body of main method (in class Exercise03), which will
test your class Potato.
When completing the code for the two classes Exercise03 and Potato, follow all the TODO items.
Follow Java coding conventions as demonstrated in the lecture materials.
Ensure that your program outputs your full name as see in ACSIS as part of the program output.
Comment your source code: comment at the top of each file with your full name, class-header comment for each class
you create, and constructor and method header comments for every constructor and method you create.
Task 2- Compile and Test Your Program
Compile and run your program.
Take a screen shot of your running program, your name must be visible as part of the program output.
Use a program test plan table in your MS Word document to first verify that your program works as expected using
some test values. Then also test with incorrect data with your program and document what happens. For example,
entering text instead of a number or entering negative numbers for either weight or cost per kilogram.
Place your screen shot and program test plan table into your MS Word document and upload this along side your .java
file(s).
Sample of Running Program
Enter weight: 2.5
Enter cost per kilogram: 1.99
potato.getWeight() is: 2.50
potato.getCostPerKilogram() is: 1.99
potato.calculatePrice() is: 4.975
potato.printReport() is:
Potato: weight 2.5, cost per kilogram 1.99
Program implemented by Stanley Pieda
In the program example above, the user inputs were formatted in this handout with black-font, bold-lettering, and a
yellow-highlight. The default settings in the Eclipse IDE will colour user inputs a light-green color.
Use a program test plan table to test your program. Sample input values are provided below. However, you should use
weight of 2.95 kilograms and $2.25 per 1 kilogram, i.e. use different input values for your version of the program test
plan table. Also, you have to test your program with incorrect input values (e.g. entering a text instead of a numerical
value).
Please help me understand this past exercise I

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!