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)

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter8: I/o Streams And Data Files
Section8.5: A Case Study: Pollen Count File Update
Problem 4E
icon
Related questions
Question

Please use java.

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.

Sample input/output files 1
data 12344 bet - Notepad
File Edit Format View Hep
Student Name: Abdul AlRahman Al Oufi
Student ID: 12344/19
College: Science
Credits Attenpted: 15
Credits tarned: 15
Grade Points: 41.2
Course Title
imszing Applications of AT,
Fund. of object oriented Prog., 3,
Calculus (2),
Discrete Math. for Comp. Sci., 3,
Introduction to Statistics,
Course code
Credit
Grade
COPP1007,
COPP2202,
MATH2100,
MATH3140,
STAT2101,
C-
3,
B-
4,
In 1. Col 1
130%
Windown (CRLF)
UTI-
Figure 1 Input file 1
12344 semsterkep.t - Notepad
File Edit Fonmat View Help
: 12344/19
I Abdul AlRahman Al oufi
Name
college : science
COURSE NO
COURSE TITLE
CREDITS
GRADE
COPP1007
COPP202
MATH2108
MATH3340
Amazing Applications of AI
Fund. of object oriented Prog. 3
Calculus (2)
Discrete Math. for Comp. Sci. 3
2
C-
B-
STAT2101
Introduction to statistics
C+
CREDITS: TOTAL.ATTEMPTED 3e EARNED 15 ATTEMPTED 15 SEM GPA
2.23
CUN GPA
2.49
Ln 1, Col
100%
Unix (LF)
Figure 2 Output file 1
Sample input/output files 2
dara, 13116e - Noad
Fle Ean Format Vien Help
student Name: Manal Ali Al Hanai
Student 1D: 13116/19
Collegei Education
Credits Attemptedi 11
Earned: 11
Grade Points: 21.1
Course
CHEP2101,
Code
Course Title
credit
Grade
General chemistry (1).
Amazing Applications of AI,
General Physics (1),
Onan: state and People (u),
4,
COMPID07,
PYS2101,
SOCYLDS,
2,
4.
2.
D+
Figure 3 Input file 2
| 13116 semsterRep tbt - Notepad
File Edit Format View Help
: 13116/19
: Manal Ali Al Hanai
: Education
Name
College
COURSE NO
COURSE TITLE
CREDITS
GRADE
CHEM2101
General Chenistry (1)
Amazing Applications of AI
General Physics (1)
Oman: State and People (UR)
4
F
COMP1007
B-
PHYS2101
4
SOCY1005
D+
CREDITS: TOTAL.ATTEMPTED 23 EARNED 8 ATTEMPTED 12 SEM GPA
1.33
CUM GPA
1.61
Figure 4 Output file 2
Transcribed Image Text:Sample input/output files 1 data 12344 bet - Notepad File Edit Format View Hep Student Name: Abdul AlRahman Al Oufi Student ID: 12344/19 College: Science Credits Attenpted: 15 Credits tarned: 15 Grade Points: 41.2 Course Title imszing Applications of AT, Fund. of object oriented Prog., 3, Calculus (2), Discrete Math. for Comp. Sci., 3, Introduction to Statistics, Course code Credit Grade COPP1007, COPP2202, MATH2100, MATH3140, STAT2101, C- 3, B- 4, In 1. Col 1 130% Windown (CRLF) UTI- Figure 1 Input file 1 12344 semsterkep.t - Notepad File Edit Fonmat View Help : 12344/19 I Abdul AlRahman Al oufi Name college : science COURSE NO COURSE TITLE CREDITS GRADE COPP1007 COPP202 MATH2108 MATH3340 Amazing Applications of AI Fund. of object oriented Prog. 3 Calculus (2) Discrete Math. for Comp. Sci. 3 2 C- B- STAT2101 Introduction to statistics C+ CREDITS: TOTAL.ATTEMPTED 3e EARNED 15 ATTEMPTED 15 SEM GPA 2.23 CUN GPA 2.49 Ln 1, Col 100% Unix (LF) Figure 2 Output file 1 Sample input/output files 2 dara, 13116e - Noad Fle Ean Format Vien Help student Name: Manal Ali Al Hanai Student 1D: 13116/19 Collegei Education Credits Attemptedi 11 Earned: 11 Grade Points: 21.1 Course CHEP2101, Code Course Title credit Grade General chemistry (1). Amazing Applications of AI, General Physics (1), Onan: state and People (u), 4, COMPID07, PYS2101, SOCYLDS, 2, 4. 2. D+ Figure 3 Input file 2 | 13116 semsterRep tbt - Notepad File Edit Format View Help : 13116/19 : Manal Ali Al Hanai : Education Name College COURSE NO COURSE TITLE CREDITS GRADE CHEM2101 General Chenistry (1) Amazing Applications of AI General Physics (1) Oman: State and People (UR) 4 F COMP1007 B- PHYS2101 4 SOCY1005 D+ CREDITS: TOTAL.ATTEMPTED 23 EARNED 8 ATTEMPTED 12 SEM GPA 1.33 CUM GPA 1.61 Figure 4 Output file 2
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 earmed 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
B
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 numerie value (i.e. scale) of the grade earned times the number
of credit hours for that course.
• 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.
o In both cases only courses with numerie-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, TemTranscript, and HW2_yourld 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 eredits 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: caleculate a semester GPA.
getCGPA() method: caleulate 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.
Transcribed Image Text: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 earmed 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 B 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 numerie value (i.e. scale) of the grade earned times the number of credit hours for that course. • 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. o In both cases only courses with numerie-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, TemTranscript, and HW2_yourld 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 eredits 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: caleculate a semester GPA. getCGPA() method: caleulate 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.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 8 steps

Blurred answer
Knowledge Booster
Constants and Variables
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr