Java Grading Program Assignment

Verified

Added on  2019/09/16

|5
|790
|169
Homework Assignment
AI Summary
This is a Java programming assignment that requires students to create a grading program for a course. The program should use a student class with instance variables for student names, quiz scores, midterm and final exam scores, total score, and final letter grade. The class should have methods for input, calculating the overall numeric marks and final letter grade, and comparing total marks between students. The program should read in student data, calculate grades, and display student records, including the student with the maximum total marks. The assignment is graded on correctness and style.
Document Page
1401102-3: Fourth Problems
Due by December 26, 2016
This assignment will require you to solve only one problem in java.
Goals:
- To understand classes.
- To be able to declare your own class with its instance variables and methods.
- To be able to write a full program in Java using user defining class and test it.
-
Your programs are graded on both correctness and style. Please review the comments regarding
programming style on the main page.:
Write a grading program for instructor whose course has the following
policies:
- Student’s first name and last name.
- Two quizzes, each graded on the base of 10 points, which weigh 25%, are
given.
- One mid-term exam graded on base of 50 points, which weigh 25%, is given.
- Final exam graded on base of 100 points, which weigh 50%, is given.
- Any grade of 90 percent or more is an A, any grade between 80 and 89 percent
is a B, any grade between 70 and 79 percent is a C, any grade between 60 and
69 is a D and any grade below 60 is an F.
- The program should read in the student’s first name and last name and scores
and display the student’s record, which consists of two quiz scores, two exam
scores (mid-term and final exam), the student’s total score for the entire
course, and the final letter grade. The total score is a number in the range 0 to
100, which represents the weighted average of the student’s work.
Define and use a class for the student record. The class should have:
1- instance variables for the student’s first name and last name, quizzes,
midterm, final, total score for the course, and final letter grade.
2- The class should have appropriate constructor methods.
tabler-icon-diamond-filled.svg

Paraphrase This Document

Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
Document Page
3- The class should have input method and should not ask for the final
numeric marks; nor should it ask for the final letter grade.
4- The class should have methods to compute the overall numeric marks and
the final letter grade. These last two methods will be void or returned type
methods that set the appropriate instance variables.
5- The class should have a method to compare between two student’s total
marks and return the student’s first name and last name with the
maximum total marks.
6- Your program should use all the methods described here. Your class should
have reasonable methods, whether your program uses them or not. You
may add other methods if you wish
The sample output is as shown below:
This program used for computing three Students scores
and displaying thier names, marks, grade and the maximum marks between all
three students in Programming Language course:
Please insert the student number 1 records
(first name, last name, quiz1,quiz2,mid-term,final-exam)
Ahlam Alahmadi
5
5
25
50
Please insert the student number 2 records
(first name, last name, quiz1, quiz2,mid-term,final-exam)
Document Page
Maha Alansari
10
10
48
80
Please insert the student number 3 records
(first name, last name, quiz1,quiz2,mid-term,final-exam)
Salma Bash
7
9
15.5
76
The information of Student 1 is:
Her name is Ahlam Alahmadi
Her Quiz1 mark is 5.0
Her Quiz2 mark is 5.0
Her Mid_term mark is 25.0
Her Final_Exam mark is 50.0
Her Total marks is 50.0%
Her Grade is F
Document Page
The information of Student 2 is:
Her name is Maha Alansari
Her Quiz1 mark is 10.0
Her Quiz2 mark is 10.0
Her Mid_term mark is 48.0
Her Final_Exam mark is 80.0
Her Total marks is 89.0%
Her Grade is B
The information of Student 3 is:
Her name is Slma Basha
Her Quiz1 mark is 7.0
Her Quiz2 mark is 9.0
Her Mid-term mark is 15.5
Her Final Exam mark is 76.0
Her Total marks is 65.75%
Her Grade is D
The maximum marks between all students is Maha Alansari
tabler-icon-diamond-filled.svg

Paraphrase This Document

Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
Document Page
Submit
Once you are satisfied with your programs, Save them in your document that has your name. and send it to
me as soon as you can.
NOTE
The first ten correct answers will be graded.
Grade
This Lab worth 3 marks 2 for correctness and 1 for style.
BEST WISHES ☺☺
NISREEN ALZAHRANI
chevron_up_icon
1 out of 5
circle_padding
hide_on_mobile
zoom_out_icon
[object Object]