Question: . . Replicate in Eclipse the code given below. To make the code easier to read, use the auto-indent feature in Eclipse Select all the

. . Replicate in Eclipse the code given below. To make the code easier to read, use the auto-indent feature in Eclipse Select all the code (CTRL+A), then click on CTRL+i. The code has a few errors. Identify and fix them. When fixed, place a few breakpoints at the start of the program and run it in debug mode step-by-step. Observe how the program progresses, the value of variables and their changes, etc. Make note of the purpose of the program, which section is executed first and why. etc. This lab activity will be graded on participation Question? on your learning experience focusing on this lab assignment and the module in general comment what was challenging, useful, interesting, where you got stuck and how you solved it, etc.) You may also pose questions regarding the topics reviewed in order for other students to assist you public class Course { public double finalGrade: // this method will calculate the average grade for the course exams, quizzes and homework public void calculateFinalGrade() { Scanner in = new Scanner(System.in); System.out.print("What is the average grade for exams? "); double examAverage = in.nextDouble(); System out.print("What is the average grade for quizzes? In"); double quizzesAverage = in.nextDoubleo: System.out.print("What is the average grade for homework? "); double homework = in.nextDouble(); finalGrade = Math.round((examAverage 0.5)+(quizzesAverage 0.3)+(homework 0.2)) // show final grade to classroom } public static void main(String[] args) { System.out.println("* Course 1 ""); Il creates an instance of the course class 1 Course myCourse1 = new Course(); I calls the calculateFinalGrade method myCourse1.calculateFinalGrade(): System.out.println(**** Course 2 ""); // creates an instance of the course class 2 Course myCourse2 = new Course(); The 203 Il calls the calculate FinalGrade method myCourse2.calculateFinalGrade() Il calculate total average double totalAverage = (myCourse 1 finalGrade + myCourse2.finalGrade) / 2; Il print total output System.out.printf("The average grade of the two courses is: 27. totalAverage); } >
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
