Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

JAVA QUESTION The program will start by asking the user about his/her current GPA and the number of credits he/she has accumulated so far elcome

JAVA QUESTION

image text in transcribed

image text in transcribedimage text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribedimage text in transcribed

image text in transcribed

The program will start by asking the user about his/her current GPA and the number of credits he/she has accumulated so far elcome to the bested GPA calculator ever.. The program will ask you first to enter the mber of credits you have accumulated so far ***If this is your very first semester, please ***enter0 Dlease onter how many credita you have ac far not including your current semester: 120 Please enter your current GPA: 4 Please enter how many courses do you want to add to the GPA calculator If the student is a new student, then he/she will enter 0 for the number of credits and the program will NOT ask the student about his/her current GPA since that question would be considered useless. ***Welcome to the bested GPA calculator ever. . The program will ask you first to enter the ***number of credits you have accumulated so far. ***If this is your very first semester, please ***enter Please enter how many credits you have accumulated so Ear not including your current semester: 0 Please enter how many courses do you want to add to the GPA calculator ***Welcome to the bested GPA calculator ever. . The progran will ask you first to enter the number of credit vou h ve ccumul ted mo f. ***If this is your very first semester, please ***enter O Please enter how many credits you have accumulated so Ear not including your current semester: 120 Please enter your current GPA: 4 Please enter how many courses do you want to add to the GPA calculator: 3 Please enter the name of course number 1: CCMP248 Please enter the number of credits of course number 1: 3 Please enter the letter grade of course number 1 A Please enter the name of course number 2: CCMP372 Please enter the number of credits of course number 2: 3 Please enter the letter grade of course number 2:B Please enter the name of course number 3 SCEN287 Please enter the number of credits of course number 3: 3 Please entethe 1etter grade of course numbe 3 A Please choose one of the following options Press 1: to display the courses in the system Press 2: to display the new GPA Press 3: to delete a course Press 4: to add a course Press 5 to exit program The program, will display the above menu, once it has gotten 1. 2. 3. the total number of credits the student has achieved so far the student's current GPA The courses the student is currently taking. These are the courses the student wants to check their effect on his/her GPA When menu option 1 is chosen, the following will be displayed Please choose one of the folloving options Press 1: to display the courses in the system Press 2: to display the new GPA Press 3 to delete a course Press 4: to add a course Press 5: to exit program Your current GEA is: 4.0 Your accumulated credits so far 120 Course Number Course Tame Course Credit Course Grade COMP2 48 COMP372 SOEN287 3.0 3.0 3.0 Please choose one of the folloving options Press 1: to display the courses in the system Press 2: to display the new GPA Press 3 to delete a course Press 4: to add a course Press 5: to exit program So, the point of option number 1 is to display the info given to the program When the user chooses option 2, the new GPA is calculated and displayed. Please choose one of the following options Press 1: to display the courses in the system Press 2: to display the new GPA Press 3 to delete a course Press 4: to add a course Press 5: to exit program Your new GPA is 3.9767441860465116 Please choose one of the following options Press 1: to display the courses in the system Press 2: to display the new GPA Press 3 to delete a course Press 4 to add a course Press 5: to exit program New GPA=x/y For example, for the above example, x- (4.0*120) (4*3)(3*3)(4*3) 513 y 120+3 3+3 129 New GPA 513/129 3.976 When the user chooses option 3, a list of the current courses will be listed and the user will be asked to choose the course number of the course to be deleted Please choose one of the following options Press 1: to display the courses in the system Press 2: to display the new GPA Press 3 to delete a course Press 4 to add a course Press 5: to exit program. Course Number Course Name Course Credit Course Grade COMP2 48 COMP372 SOEN2 87 3.0 3.0 3.0 Please enter the course number you want to delete: 2 Please choose one of the folloving options Press 1: to display the courses in the system Press 2: to display the new GPA Press 3 to delete a course Press 4 to add a course Press 5: to exit program Your current GPA is: 4.0 Your accumulated credits so far: 120 Course Number Course Name Course Credit Course Grade COMP2 48 SOEN287 3.0 3.0 After the deletion of course number 2, you can see the effect of that on the GPA: Course Number Course Name Course Credit Course Grade COMP248 SOEN287 3.0 3.0 D1ea=e -hoo=e ne f the following option Press 1: to display the courses in the system Press 2: to display the new GEA Press 3 to delete a course Press 4: to add a course Press 5: to exit program Your new GPA is 4.0 Option 4 is used to add a course: Please choose one of the folloving options Press 1: to display the courses in the system Press 2: to display the new GPA Press 3: to delete a course Press 4 to add a course Press 5: to exit program Pleare enter the name of courae number 3: COMD123 Please enter the number of credits of course number 3: 6 Please enter the letter grade of course number 3: D Please choose one of the folloving options Press 1: to display the courses in the ystem Press 2: to display the new GPA Press 3: to delete a course Pre 4: to add a course Press 8: exit pr gram Your current GPA is: 4.0 Your accumulated credits so far: 120 Course Number Course Name Course Credit Course Grade COMP248 SOEN2 87 COMP123 3.0 3.0 6.0 After adding this 6 credit course with a letter grade of D, we can check the effect of that on the GPA Course Number Course Name Course Credit Course Grade COMP248 SOEN2 87 COMP123 3.0 3.0 6.0 Please choose one of the folloving options Press 1: to display the courses in the system Press 2: to display the new GPA Press 3: to delete a course Press 4: to add a course Press 5: to exit program Your new GPA is 3.8636363636363638 Option 5, will make the program terminate There are lots of data validations that have to be done: Here you are some examples: 1. Number of credits accumulated so far must be greater than or equal to O; it can not be a negative number 2. Current GPA has to be between 0 to 4.3 inclusive Please enter your current GPA: -3 ERROR a valid GPA is between D to 4.3 inclusive Please enter your current GPA: | 3. Number of courses to add to the system has to be greater than 0 Please enter how many courses do you want tadd to the GPA calculator : -3 ERROR: number of courses has to be a positive number Please enter how many courses do you want to add to the GpAalciator: 0 ERROR: number of courses has to be a positive number. Please enter how many courses do you want to add to the GPA caleulator: | 4. Number of credits of a course has to be greater than 0 Please enter how many courses do you want to add to the GPA calculator: 1 Please enter the name of course number 1 COMP248 Please enter the number of credits of course number 1 -4 ERROR: course credit has to be a positive nunber. Please enter the number of credits of course number 1: 5. Letter grade has to be a valid one Please enter the letter grade of course number 2: a ERROR course grade has to be one of the following.. . At, A, A-, B+, B, B-, C+, C, C-, Dt, D, D-, ENS Please enter the letter grade of course number 2: | 6. The chosen menu option has to be between 1 and 5 inclusive Please choose one of the following options Press 1: to display the courses in the system Press 2 to display the new GPA Press 3: to delete a course Press 5: to exit program Menu option has to be between 1 and5 inclusive Some technical requirements you must abide by: 1. Use a switch/case statement to handle the menu options 2. Use one array to store the added course names 3. Use one array to store the added course credits 4. Use one array to store the added course letter grades 5. Use a constant for the maximum number of courses the system can support 6. If the user tries to add more courses, display an error message The program will start by asking the user about his/her current GPA and the number of credits he/she has accumulated so far elcome to the bested GPA calculator ever.. The program will ask you first to enter the mber of credits you have accumulated so far ***If this is your very first semester, please ***enter0 Dlease onter how many credita you have ac far not including your current semester: 120 Please enter your current GPA: 4 Please enter how many courses do you want to add to the GPA calculator If the student is a new student, then he/she will enter 0 for the number of credits and the program will NOT ask the student about his/her current GPA since that question would be considered useless. ***Welcome to the bested GPA calculator ever. . The program will ask you first to enter the ***number of credits you have accumulated so far. ***If this is your very first semester, please ***enter Please enter how many credits you have accumulated so Ear not including your current semester: 0 Please enter how many courses do you want to add to the GPA calculator ***Welcome to the bested GPA calculator ever. . The progran will ask you first to enter the number of credit vou h ve ccumul ted mo f. ***If this is your very first semester, please ***enter O Please enter how many credits you have accumulated so Ear not including your current semester: 120 Please enter your current GPA: 4 Please enter how many courses do you want to add to the GPA calculator: 3 Please enter the name of course number 1: CCMP248 Please enter the number of credits of course number 1: 3 Please enter the letter grade of course number 1 A Please enter the name of course number 2: CCMP372 Please enter the number of credits of course number 2: 3 Please enter the letter grade of course number 2:B Please enter the name of course number 3 SCEN287 Please enter the number of credits of course number 3: 3 Please entethe 1etter grade of course numbe 3 A Please choose one of the following options Press 1: to display the courses in the system Press 2: to display the new GPA Press 3: to delete a course Press 4: to add a course Press 5 to exit program The program, will display the above menu, once it has gotten 1. 2. 3. the total number of credits the student has achieved so far the student's current GPA The courses the student is currently taking. These are the courses the student wants to check their effect on his/her GPA When menu option 1 is chosen, the following will be displayed Please choose one of the folloving options Press 1: to display the courses in the system Press 2: to display the new GPA Press 3 to delete a course Press 4: to add a course Press 5: to exit program Your current GEA is: 4.0 Your accumulated credits so far 120 Course Number Course Tame Course Credit Course Grade COMP2 48 COMP372 SOEN287 3.0 3.0 3.0 Please choose one of the folloving options Press 1: to display the courses in the system Press 2: to display the new GPA Press 3 to delete a course Press 4: to add a course Press 5: to exit program So, the point of option number 1 is to display the info given to the program When the user chooses option 2, the new GPA is calculated and displayed. Please choose one of the following options Press 1: to display the courses in the system Press 2: to display the new GPA Press 3 to delete a course Press 4: to add a course Press 5: to exit program Your new GPA is 3.9767441860465116 Please choose one of the following options Press 1: to display the courses in the system Press 2: to display the new GPA Press 3 to delete a course Press 4 to add a course Press 5: to exit program New GPA=x/y For example, for the above example, x- (4.0*120) (4*3)(3*3)(4*3) 513 y 120+3 3+3 129 New GPA 513/129 3.976 When the user chooses option 3, a list of the current courses will be listed and the user will be asked to choose the course number of the course to be deleted Please choose one of the following options Press 1: to display the courses in the system Press 2: to display the new GPA Press 3 to delete a course Press 4 to add a course Press 5: to exit program. Course Number Course Name Course Credit Course Grade COMP2 48 COMP372 SOEN2 87 3.0 3.0 3.0 Please enter the course number you want to delete: 2 Please choose one of the folloving options Press 1: to display the courses in the system Press 2: to display the new GPA Press 3 to delete a course Press 4 to add a course Press 5: to exit program Your current GPA is: 4.0 Your accumulated credits so far: 120 Course Number Course Name Course Credit Course Grade COMP2 48 SOEN287 3.0 3.0 After the deletion of course number 2, you can see the effect of that on the GPA: Course Number Course Name Course Credit Course Grade COMP248 SOEN287 3.0 3.0 D1ea=e -hoo=e ne f the following option Press 1: to display the courses in the system Press 2: to display the new GEA Press 3 to delete a course Press 4: to add a course Press 5: to exit program Your new GPA is 4.0 Option 4 is used to add a course: Please choose one of the folloving options Press 1: to display the courses in the system Press 2: to display the new GPA Press 3: to delete a course Press 4 to add a course Press 5: to exit program Pleare enter the name of courae number 3: COMD123 Please enter the number of credits of course number 3: 6 Please enter the letter grade of course number 3: D Please choose one of the folloving options Press 1: to display the courses in the ystem Press 2: to display the new GPA Press 3: to delete a course Pre 4: to add a course Press 8: exit pr gram Your current GPA is: 4.0 Your accumulated credits so far: 120 Course Number Course Name Course Credit Course Grade COMP248 SOEN2 87 COMP123 3.0 3.0 6.0 After adding this 6 credit course with a letter grade of D, we can check the effect of that on the GPA Course Number Course Name Course Credit Course Grade COMP248 SOEN2 87 COMP123 3.0 3.0 6.0 Please choose one of the folloving options Press 1: to display the courses in the system Press 2: to display the new GPA Press 3: to delete a course Press 4: to add a course Press 5: to exit program Your new GPA is 3.8636363636363638 Option 5, will make the program terminate There are lots of data validations that have to be done: Here you are some examples: 1. Number of credits accumulated so far must be greater than or equal to O; it can not be a negative number 2. Current GPA has to be between 0 to 4.3 inclusive Please enter your current GPA: -3 ERROR a valid GPA is between D to 4.3 inclusive Please enter your current GPA: | 3. Number of courses to add to the system has to be greater than 0 Please enter how many courses do you want tadd to the GPA calculator : -3 ERROR: number of courses has to be a positive number Please enter how many courses do you want to add to the GpAalciator: 0 ERROR: number of courses has to be a positive number. Please enter how many courses do you want to add to the GPA caleulator: | 4. Number of credits of a course has to be greater than 0 Please enter how many courses do you want to add to the GPA calculator: 1 Please enter the name of course number 1 COMP248 Please enter the number of credits of course number 1 -4 ERROR: course credit has to be a positive nunber. Please enter the number of credits of course number 1: 5. Letter grade has to be a valid one Please enter the letter grade of course number 2: a ERROR course grade has to be one of the following.. . At, A, A-, B+, B, B-, C+, C, C-, Dt, D, D-, ENS Please enter the letter grade of course number 2: | 6. The chosen menu option has to be between 1 and 5 inclusive Please choose one of the following options Press 1: to display the courses in the system Press 2 to display the new GPA Press 3: to delete a course Press 5: to exit program Menu option has to be between 1 and5 inclusive Some technical requirements you must abide by: 1. Use a switch/case statement to handle the menu options 2. Use one array to store the added course names 3. Use one array to store the added course credits 4. Use one array to store the added course letter grades 5. Use a constant for the maximum number of courses the system can support 6. If the user tries to add more courses, display an error message

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Marketing The Ultimate Marketing Tool

Authors: Edward L. Nash

1st Edition

0070460639, 978-0070460638

More Books

Students also viewed these Databases questions