Question
Instructions: For submission, the students should write: IPO The flowchart the source code (Java program) the output (three sets) In the source code, use comments
Instructions: |
For submission, the students should write: IPO The flowchart the source code (Java program) the output (three sets) In the source code, use comments to state your matric number, name, program, and lab assignment number
|
Company Lonikayodoh wants to build a grading system prototype for the chicken eggs that it produced which are given grades based on the weights range as shown in Table 1. For this prototype, the company worker needs to manually insert the eggs weight and the system will determine the grade automatically according to the weight ranges. Then the system needs to produce a report for every 10 eggs produced. Each report should specify the total amount for each eggs grade, the average weight for each grade produced and the total amount of weight of all eggs produced.
Table 1: Grades of Eggs According to Weight
Weight (gram) |
Grade |
above 44 g | A |
30 44 g | B |
25 29 g | C |
less 25 g | D (rejected) |
Write the following methods and the main method for the program:
i. Method named getGrade to determine grade of the egg and calculate the total weight of each grade.
Ii. Method named countGrade to count the total of eggs for each grade.
Iii. Method named displayReport to display the output required.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started