Question: Could someone tell me what's wrong with my code in Java? I'm mostly having trouble with example 7. It will print the congratulations statement instead

Could someone tell me what's wrong with my code in Java?

Could someone tell me what's wrong with my code in Java? I'mmostly having trouble with example 7. It will print the congratulations statementinstead of the you will statement. I'm also not sure if anyof my recent changes affected my other outputs. But my main objective

I'm mostly having trouble with example 7. It will print the congratulations statement instead of the you will statement. I'm also not sure if any of my recent changes affected my other outputs. But my main objective is for the code to match all of the inputs and outputs. I'm going to add my code to the comments because it makes it too long to ask a question.

Example 1: weights don't add up Grading Scale: 90 - 100 B 80 - 89 70 - 79 D 60 - 69 F below 60 What letter grade do you want to achieve for the course?A Enter percentage weights below. Exam 1: 15 Exam 2: 15 Final Exam: 20 Labs: 15 Projects: 20 Participation: 3 Quizzes: 7 Weights don't add up to 100, program exiting... Example 2: user has all scores Grading Scale: 90 - 100 B 80 - 89 70 - 79 D 60 - 69 F below 60 What letter grade do you want to achieve for the course?A Enter percentage weights below. Exam 1: 15 Exam 2: 20 Final Exam: 20 Labs: 15 Projects: 20 Participation: 3 Quizzes: 7 Do you know your exam 1 score?y Score received on exam 1:92 Do you know your exam 2 score?YES Score received on exam 2:95 Do you know your final exam score? Yes Score received on final exam: 91 Do you know your lab average?yes Average lab grade: 92 Do you know your project average ?YES Average project grade:85 Do you know your participation average? YES Average participation grade: 100 Do you know your quiz average?Yes Average quiz grade: 85 Current grade score: 90.75 Your current letter grade:A Congratulations! You received the A that you wanted! Example 3: user has only some scores Grading Scale: A 90 - 100 B 80 - 89 70 - 79 D 60 - 69 F below 60 What letter grade do you want to achieve for the course?B Enter percentage weights below. Exam 1: 15 Exam 2: 20 Final Exam: 20 Labs: 15 Projects: 20 Participation: 3 Quizzes: 7 Do you know your exam 1 score?no Do you know your lab average?yes Average lab grade:50 Do you know your project average?yes Average project grade:80 Do you know your participation average ?YES Average participation grade: 100 Do you know your quiz average?no Current grade score:69.74 Your current letter grade:D In order to receive a grade of B, you need to score an average greater than or equal to 86.29 in the rest of the grade items. Example 4: user cannot get the desired grade Grading Scale: A 90 - 100 B 80 - 89 70 - 79 D 60 - 69 F below 60 What letter grade do you want to achieve for the course?A Enter percentage weights below. Exam 1: 15 Exam 2: 20 Final Exam: 20 Labs: 15 Projects: 20 Participation: 3 Quizzes: 7 Do you know your exam 1 score?Yes Score received on exam 1:32 Do you know your exam 2 score?YES Score received on exam 2:48 Do you know your final exam score?YES Score received on final exam:28 Do you know your lab average?yes Average lab grade:28 Do you know your project average?no Do you know your participation average?yes Average participation grade: 0 Do you know your quiz average?NO Current grade score: 33.15 Your current letter grade:F Unfortunately, a grade of A is not possible. Example 5: user enters answers other than yeso (treated as no) Grading Scale: A 90 - 100 B 80 - 89 70 - 79 D 60 - 69 F below 60 What letter grade do you want to achieve for the course?C Enter percentage weights below. Exam 1: 15 Exam 2: 20 Final Exam : 20 Labs: 15 Projects: 20 Participation: 5 Quizzes: 5 Do you know your exam 1 score?Yes Score received on exam 1:45 Do you know your exam 2 score?nope Do you know your lab average?kinda Do you know your project average?Nah Do you know your participation average?no Do you know your quiz average?yes Average quiz grade: 70 Current grade score:51.25 Your current letter grade: In order to receive a grade of C, you need to score an average greater than or equal to 74.69 in the rest of the grade items. Example 6: user enters an invalid grade Grading Scale: A 90 - 100 B 80 - 89 70 - 79 D 60 - 69 F below 60 What letter grade do you want to achieve for the course?Z The input is invalid. Example 7: user achieves the grade they want with grades remaining Grading Scale: A 90 - 100 B 80 - 89 70 - 79 D 60 - 69 F below 60 What letter grade do you want to achieve for the course?D Enter percentage weights below. Exam 1: 20 Exam 2: 20 Final Exam: 20 Labs: 10 Projects: 10 Participation: 10 Quizzes: 10 Do you know your exam 1 score?y Score received on exam 1:100 Do you know your exam 2 score?y Score received on exam 2:100 Do you know your final exam score?Y Score received on final exam: 100 Do you know your lab average?y Average lab grade: 100 Do you know your project average? Average project grade: 100 Do you know your participation average?n Do you know your quiz average?N Current grade score: 100.00 Your current letter grade: A You will receive at least a grade of D. Example 8: user knows all scores and does not obtain desired grade Grading Scale: A 90 - 100 B 80 - 89 70 - 79 D 60 - 69 F below 60 What letter grade do you want to achieve for the course?A Enter percentage weights below. Exam 1: 15 Exam 2: 20 Final Exam: 20 Labs: 15 Projects: 20 Participation: 3 Quizzes: 7 Do you know your exam 1 score?yes Score received on exam 1:79 Do you know your exam 2 score?yes Score received on exam 2:72 Do you know your final exam score?y Score received on final exam: 91 Do you know your lab average?y Average lab grade:92 Example 1: weights don't add up Grading Scale: 90 - 100 B 80 - 89 70 - 79 D 60 - 69 F below 60 What letter grade do you want to achieve for the course?A Enter percentage weights below. Exam 1: 15 Exam 2: 15 Final Exam: 20 Labs: 15 Projects: 20 Participation: 3 Quizzes: 7 Weights don't add up to 100, program exiting... Example 2: user has all scores Grading Scale: 90 - 100 B 80 - 89 70 - 79 D 60 - 69 F below 60 What letter grade do you want to achieve for the course?A Enter percentage weights below. Exam 1: 15 Exam 2: 20 Final Exam: 20 Labs: 15 Projects: 20 Participation: 3 Quizzes: 7 Do you know your exam 1 score?y Score received on exam 1:92 Do you know your exam 2 score?YES Score received on exam 2:95 Do you know your final exam score? Yes Score received on final exam: 91 Do you know your lab average?yes Average lab grade: 92 Do you know your project average ?YES Average project grade:85 Do you know your participation average? YES Average participation grade: 100 Do you know your quiz average?Yes Average quiz grade: 85 Current grade score: 90.75 Your current letter grade:A Congratulations! You received the A that you wanted! Example 3: user has only some scores Grading Scale: A 90 - 100 B 80 - 89 70 - 79 D 60 - 69 F below 60 What letter grade do you want to achieve for the course?B Enter percentage weights below. Exam 1: 15 Exam 2: 20 Final Exam: 20 Labs: 15 Projects: 20 Participation: 3 Quizzes: 7 Do you know your exam 1 score?no Do you know your lab average?yes Average lab grade:50 Do you know your project average?yes Average project grade:80 Do you know your participation average ?YES Average participation grade: 100 Do you know your quiz average?no Current grade score:69.74 Your current letter grade:D In order to receive a grade of B, you need to score an average greater than or equal to 86.29 in the rest of the grade items. Example 4: user cannot get the desired grade Grading Scale: A 90 - 100 B 80 - 89 70 - 79 D 60 - 69 F below 60 What letter grade do you want to achieve for the course?A Enter percentage weights below. Exam 1: 15 Exam 2: 20 Final Exam: 20 Labs: 15 Projects: 20 Participation: 3 Quizzes: 7 Do you know your exam 1 score?Yes Score received on exam 1:32 Do you know your exam 2 score?YES Score received on exam 2:48 Do you know your final exam score?YES Score received on final exam:28 Do you know your lab average?yes Average lab grade:28 Do you know your project average?no Do you know your participation average?yes Average participation grade: 0 Do you know your quiz average?NO Current grade score: 33.15 Your current letter grade:F Unfortunately, a grade of A is not possible. Example 5: user enters answers other than yeso (treated as no) Grading Scale: A 90 - 100 B 80 - 89 70 - 79 D 60 - 69 F below 60 What letter grade do you want to achieve for the course?C Enter percentage weights below. Exam 1: 15 Exam 2: 20 Final Exam : 20 Labs: 15 Projects: 20 Participation: 5 Quizzes: 5 Do you know your exam 1 score?Yes Score received on exam 1:45 Do you know your exam 2 score?nope Do you know your lab average?kinda Do you know your project average?Nah Do you know your participation average?no Do you know your quiz average?yes Average quiz grade: 70 Current grade score:51.25 Your current letter grade: In order to receive a grade of C, you need to score an average greater than or equal to 74.69 in the rest of the grade items. Example 6: user enters an invalid grade Grading Scale: A 90 - 100 B 80 - 89 70 - 79 D 60 - 69 F below 60 What letter grade do you want to achieve for the course?Z The input is invalid. Example 7: user achieves the grade they want with grades remaining Grading Scale: A 90 - 100 B 80 - 89 70 - 79 D 60 - 69 F below 60 What letter grade do you want to achieve for the course?D Enter percentage weights below. Exam 1: 20 Exam 2: 20 Final Exam: 20 Labs: 10 Projects: 10 Participation: 10 Quizzes: 10 Do you know your exam 1 score?y Score received on exam 1:100 Do you know your exam 2 score?y Score received on exam 2:100 Do you know your final exam score?Y Score received on final exam: 100 Do you know your lab average?y Average lab grade: 100 Do you know your project average? Average project grade: 100 Do you know your participation average?n Do you know your quiz average?N Current grade score: 100.00 Your current letter grade: A You will receive at least a grade of D. Example 8: user knows all scores and does not obtain desired grade Grading Scale: A 90 - 100 B 80 - 89 70 - 79 D 60 - 69 F below 60 What letter grade do you want to achieve for the course?A Enter percentage weights below. Exam 1: 15 Exam 2: 20 Final Exam: 20 Labs: 15 Projects: 20 Participation: 3 Quizzes: 7 Do you know your exam 1 score?yes Score received on exam 1:79 Do you know your exam 2 score?yes Score received on exam 2:72 Do you know your final exam score?y Score received on final exam: 91 Do you know your lab average?y Average lab grade:92

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!