lease use java only. Write a program that reads from an input file, given by a user, students grade information after a semester and your program generate a semester report including courses information as shown in the sample runs. The input file includes student information: name, id, and college, followed by cumulative of previous semesters: total credits attempted, credits earned and total grade points. At the end of the input file the grades and information of the last completed semester courses are provided as shown in the sample inputs. Your program will calculate the total attempted credits, semester earned credits, semester grade point average (GPA) and cumulated grade point average (CGPA) according to the courses’ grades and the number of cred
Please use java only.
Write a program that reads from an input file, given by a user, students grade information after a semester and
your program generate a semester report including courses information as shown in the sample runs.
The input file includes student information: name, id, and college, followed by cumulative of previous semesters:
total credits attempted, credits earned and total grade points. At the end of the input file the grades and
information of the last completed semester courses are provided as shown in the sample inputs.
Your program will calculate the total attempted credits, semester earned credits, semester grade point average
(GPA) and cumulated grade point average (CGPA) according to the courses’ grades and the number of credit
hours of the courses. The scales of each grade are shown in Table 1. F, FSP, FW, and NPW grades will have zero
value.
Table 1 Grade scales
The Grade Point Average (GPA) is a weighted average that summarizes each of the two levels of activity: the
semester and the cumulative work to date.
• The semester GPA is calculated on the courses taken within a given semester,
• The cumulative GPA is calculated on all courses taken to date, inclusive of all semesters.
The semester GPA (semester GPA) shall be calculated as follows:
o The grade point earned in a course = The numeric value (i.e. scale) of the grade earned times the number
of credit hours for that course.
o The semester Grade Point Average = The sum of the grade points earned in that semester divided by The
total credit hours attempted during that semester.
o The calculation of the cumulative GPA (CGPA) shall be based on all courses taken and all credits
attempted to date. The total grade points earned is divided by the total credits attempted.
o In both cases only courses with numeric-value grades are considered. (Please note that in such a
computation. The grade designations I(x), W, P, NP, IP, TC, AU and OP are not calculated in the grade
point average)
Your program should include three classes: Course, TermTranscript, and HW2_yourId classes.
Course class: should contain necessary instance variables and methods of a course and at least these methods:
• getGradePoint(): gives a grade point of a course using table 1.
• getCreditEarned(): gives number of earned credits if student have one of the grades from table 1;
otherwise it is zero.
• getCreditAttempted(): gives number of attempted credits in a course.
TermTranscript class: should contain student information, previous semesters information and all courses
information. The class should contain any necessary methods, and at least the following:
• getSemesterGPA() method: calculate a semester GPA.
• getCGPA() method: calculate cumulative GPA (CGPA).
• semesterCreditEarned() method: gives credit earned in a semester.
• semesterCreditAttempted() method: gives credit attempted in a semester.
• generateReport() method: creates an output file with name “ID_semesterRep.txt” and displays the report
as shown in the sample outputs.
HW2_yourId class: is a tester class that prompts users to enter an input file name, reads student data and creates
TermTranscript object and calls generateReport() method to create an output file with student report.
![Problem:
Write a program that reads from an input file, given by a user, students grade information after a semester and
your program generate a semester report including courses information as shown in the sample runs.
The input file includes student information: name, id, and college, followed by cumulative of previous semesters:
total credits attempted, credits earned and total grade points. At the end of the input file the grades and
information of the last completed semester courses are provided as shown in the sample inputs.
Your program will calculate the total attempted credits, semester earned credits, semester grade point average
(GPA) and cumulated grade point average (CGPA) according to the courses' grades and the number of credit
hours of the courses. The scales of each grade are shown in Table 1. F, FSP, FW, and NPW grades will have zero
value.
Table 1 Grade scales
A
4.00
C+
2.30
A-
3.70
2.00
B+
3.30
C-
1.70
3.00
D+
1.30
B-
2.70
D
1.00
The Grade Point Average (GPA) is a weighted average that summarizes each of the two levels of activity: the
semester and the cumulative work to date.
• The semester GPA is calculated on the courses taken within a given semester,
The cumulative GPA is calculated on all courses taken to date, inclusive of all semesters.
The semester GPA (semester GPA) shall be calculated as follows:
o The grade point earned in a course = The numeric value (i.e. scale) of the grade earned times the number
of credit hours for that course.
o The semester Grade Point Average = The sum of the grade points earned in that semester divided by The
total credit hours attempted during that semester.
Reference: GPA information provided from undergraduate academic regulations book in squ.edu.om/admissions
o The calculation of the cumulative GPA (CGPA) shall be based on all courses taken and all credits
attempted to date. The total grade points earned is divided by the total credits attempted.
In both cases only courses with numeric-value grades are considered. (Please note that in such a
computation. The grade designations I(x), W, P, NP, IP, TC, AU and OP are not calculated in the grade
point average)](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F91ad0dcd-38ac-42ad-b8f9-a7ce1921a74f%2F32af2f50-5fb3-40a7-8b75-dd5d4acfb6e1%2Ff9c2ed_processed.png&w=3840&q=75)
![Your program should include three classes: Course, TermTranscript, and HW2_yourId classes.
Course class: should contain necessary instance variables and methods of a course and at least these methods:
getGradePoint(): gives a grade point of a course using table 1.
getCreditEarned(): gives number of earned credits if student have one of the grades from table 1;
otherwise it is zero.
getCreditAttempted(): gives number of attempted credits in a course.
TermTranscript class: should contain student information, previous semesters information and all courses
information. The class should contain any necessary methods, and at least the following:
getSemesterGPA() method: calculate a semester GPA.
• getCGPA() method: calculate cumulative GPA (CGPA).
semesterCreditEarned() method: gives credit earned in a semester.
semesterCreditAttempted() method: gives credit attempted in a semester.
generateReport() method: creates an output file with name "ID_semesterRep.txt" and displays the report
as shown in the sample outputs.
HW2_yourld class: is a tester class that prompts users to enter an input file name, reads student data and creates
TermTranscript object and calls generateReport() method to create an output file with student report.
Sample input/output files 1
| data_12344.t - Notepad
File Edit Format View Help
student Name: Abdul AlRahman Al oufi
Student ID: 12344/19
College: Science
Credits Attempted: 15
Credits Earned: 15
Grade Points: 41.2
Course Code
COMP1007,
Course Title
Credit
Grade
Amazing Applications of AI,
Fund. of object Oriented Prog., 3,
Calculus (2),
Discrete Math. for Comp. Sci.,
Introduction to statistics,
2,
B
COMP2202,
C-
MATH2108,
MATH3340,
STAT2101,
3,
C-
3,
4,
В-
C+
Ln 1, Col 1
Windows (CRLF)
100%
UTF-8
Figure 1 Input file 1
12344 semsterRep.txt - Notepad
File Edit Format View Help
: 12344/19
: Abdul AlRahman Al oufi
: Science
ID
Name
College
COURSE NO
COURSE TITLE
CREDITS
GRADE
Amazing Applications of AI
Fund. of object Oriented Prog. 3
Calculus (2)
Discrete Math. for Comp. Sci. 3
Introduction to Statistics
COMP1007
2
B
COMP2202
C-
MATH2108
3
C-
МАТНЗ340
B-
STAT2101
4
C+
CREDITS: TOTAL.ATTEMPTED 30 EARNED 15 ATTEMPTED 15
SEM GPA
2.23
CUM GPA
2.49
Ln 1, Col 1
100%
Unix (LF)
UTF-8
Figure 2 Output file 1](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F91ad0dcd-38ac-42ad-b8f9-a7ce1921a74f%2F32af2f50-5fb3-40a7-8b75-dd5d4acfb6e1%2Fuukbph9_processed.png&w=3840&q=75)
![](/static/compass_v2/shared-icons/check-mark.png)
Trending now
This is a popular solution!
Step by step
Solved in 2 steps
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![C How to Program (8th Edition)](https://www.bartleby.com/isbn_cover_images/9780133976892/9780133976892_smallCoverImage.gif)
![Database Systems: Design, Implementation, & Manag…](https://www.bartleby.com/isbn_cover_images/9781337627900/9781337627900_smallCoverImage.gif)
![Programmable Logic Controllers](https://www.bartleby.com/isbn_cover_images/9780073373843/9780073373843_smallCoverImage.gif)