Assessment Task

You are to write a Java console application that processes student marks. The number of students (N) is fixed at 10, so it should be declared as final int N = 10 in your program.

Grades are allocated as shown in Table 1:

Grade, Mark Range
HD, 85-100
D, 75-84
C, 65-74
P, 50-64
F, 0-49

Table 1: Grades

When a mark is entered, the application calculates and displays the corresponding grade. When all marks have been entered, a summary report consisting of

  • The lowest mark
  • The highest mark
  • The average mark
  • The number of students passed (i.e. achieved a mark of 50-100)
  • The number of students who failed (i.e. achieved a mark of 0-49)

is displayed.

Below is example output for N = 3

Your welcome message goes here …

Mark for student 1: 100
Grade for student 1: HD
Mark for student 2: 0
Grade for student 2: F
Mark for student 3: 50
Grade for student 3: P

Summary
********
Lowest mark: 0
Highest mark: 100
Average mark: 50
Number passed: 2
Number failed: 1

Your exit message goes here …

Your application is to follow the same format for input and output as in the example above, but with customised welcome and exit messages.

The application is to use the following classes and methods:

public class Grader {
// no attributes required
public Grader() {
// no code required
}
public String grade(int mark) {
// code to determine grade goes here
}
public boolean pass(int mark) {
// code to determine pass goes here
}
}
public class Assignment1 {
// no attributes required
public static void main(String[] args) {
// local variable declarations go here
// display welcome message
// loop to input marks, calculate and display grade, calculate summary values
// generate and display summary
// display exit message
}
}
Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.