Question 2: Student Grades Report Java Program In this question, write a complete Java program to prompt the student for a sequence of courses with its grade in the format of “Course1|Grade1;Course2|Grade2;Course3|Grade3;” as one string. Your program should separate the string into the course name and grade individually and save the course names and grades in two different arrays (2D-character array for course names and integer array for grade) and display the list of courses, average of the grades as a numerical value and letter accordingly. You can expect a perfect user who will enter the correct format. Your program should work for any numbers of course that were entered. Note: The table below depicts the numerical grades and their corresponding letter grade.  Letter Grade Numerical Value A ≥88 B ≥ 80 C ≥ 67 D ≥ 60 F < 60

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

Question 2: Student Grades Report Java Program
In this question, write a complete Java program to prompt the student for a sequence of courses
with its grade in the format of “Course1|Grade1;Course2|Grade2;Course3|Grade3;” as one string. Your
program should separate the string into the course name and grade individually and save the course
names and grades in two different arrays (2D-character array for course names and integer array for
grade) and display the list of courses, average of the grades as a numerical value and letter accordingly.
You can expect a perfect user who will enter the correct format. Your program should work for any
numbers of course that were entered.

Note: The table below depicts the numerical grades and their corresponding letter grade. 

Letter Grade Numerical Value
A ≥88
B ≥ 80
C ≥ 67
D ≥ 60
F < 60

 

****
****
****
Welcome to Student Courses Grade Program!
****
--- ***
Please enter the courses your are taking this semester (courselgrade and separated by a semicolon):
MATH101|40;STAT-102|20;LANG304|85;
Here is the list of courses you are taking:
No.1 MATH101
No.2 STAT-102
No.3 LANG304
The average of your courses: 48.33 and the average courses letter grade is: F
Thank you for using Student Courses Grade Program!
Figure 2 Sample output of Question2
Welcome to Student Courses Grade Program!
****-------****-
----****
Please enter the courses your are taking this semester (courselgrade and separated by a semicolon):
comp248|88;STAT202|92;COMP101|96; ENGG-203|95;
Here is the list of courses you are taking:
No.1 comp248
No.2 STAT202
No.3 COMP101
No.4 ENGG-203
The average of your courses: 92.75 and the average courses letter grade is: A
Thank you for using Student Courses Grade Program!
Figure 3 Sample output of Question2
Transcribed Image Text:**** **** **** Welcome to Student Courses Grade Program! **** --- *** Please enter the courses your are taking this semester (courselgrade and separated by a semicolon): MATH101|40;STAT-102|20;LANG304|85; Here is the list of courses you are taking: No.1 MATH101 No.2 STAT-102 No.3 LANG304 The average of your courses: 48.33 and the average courses letter grade is: F Thank you for using Student Courses Grade Program! Figure 2 Sample output of Question2 Welcome to Student Courses Grade Program! ****-------****- ----**** Please enter the courses your are taking this semester (courselgrade and separated by a semicolon): comp248|88;STAT202|92;COMP101|96; ENGG-203|95; Here is the list of courses you are taking: No.1 comp248 No.2 STAT202 No.3 COMP101 No.4 ENGG-203 The average of your courses: 92.75 and the average courses letter grade is: A Thank you for using Student Courses Grade Program! Figure 3 Sample output of Question2
For example
If the user's input is "COMP248|95,ENGLISH201|75,CHEMISTRY-1|45,", then the info saved in
the 2D-character array is:
M
2
4
E
N
G
L
H.
2
1
H
E
M
Y
1
the info saved in the integer array is:
95
75
45
your program should display "Here is the list of courses you are taking:
No.1 COMP248
No.2 ENGLISH201
No.3 CHEMISTRY-1
The average of your courses: 71.67 and the average courses letter grade
is: C
(Note: your program should read the output data from the arrays).
Hint: you can use Integer.parseInt () to convert a string to an integer number and
toCharArray () to convert a string to a character array.
The following are sample screen shots to illustrate the expected behavior of your program. Your program
must display the same information with the same format. (assume that the data in green has been entered
by the user).
*本**。
****
Welcome to Student Courses Grade Program!
-----****-------****-------****
****
Please enter the courses your are taking this semester (courselgrade and separated by a semicolon):
You are not taking any course now!
Thank you for using Student Courses Grade Program!
Figure 1 Sample output of Question2
NR
Transcribed Image Text:For example If the user's input is "COMP248|95,ENGLISH201|75,CHEMISTRY-1|45,", then the info saved in the 2D-character array is: M 2 4 E N G L H. 2 1 H E M Y 1 the info saved in the integer array is: 95 75 45 your program should display "Here is the list of courses you are taking: No.1 COMP248 No.2 ENGLISH201 No.3 CHEMISTRY-1 The average of your courses: 71.67 and the average courses letter grade is: C (Note: your program should read the output data from the arrays). Hint: you can use Integer.parseInt () to convert a string to an integer number and toCharArray () to convert a string to a character array. The following are sample screen shots to illustrate the expected behavior of your program. Your program must display the same information with the same format. (assume that the data in green has been entered by the user). *本**。 **** Welcome to Student Courses Grade Program! -----****-------****-------**** **** Please enter the courses your are taking this semester (courselgrade and separated by a semicolon): You are not taking any course now! Thank you for using Student Courses Grade Program! Figure 1 Sample output of Question2 NR
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 2 images

Blurred answer
Knowledge Booster
Array
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
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education