Question: PLEASE Help me fixing the errors in this java code by writing the code for (Student) Class Please I Need Help #HelpMe #Jave 2. Download


PLEASE Help me fixing the errors in this java code by writing the code for (Student) Class Please I Need Help #HelpMe #Jave
2. Download and import the attached file Homework1Q2.zip to your Eclipse workspace (Click File > Import > General >Existing Projects into workspace > Select archive file) You will see one runner class in the default package that has errors. Fix the errors by creating the corresponding missing classes without modifying Runner.java. Once done, the output of your program should look exactly like the following ID Name Age CH Academic Year 1 Abdulla Al-Naimi 20 18 Sophomore 2 Aisha AlQahtani 23 12 Freshman Setting number of enrolled classes of Aisha to 4 2 Aisha AlQahtani 23 12 Freshman Set enrolled classes to 10! Error, cannot enroll in more than 6 courses 2 Aisha AlQahtani 23 12 Freshman Setting Aisha's age to 19 2 Aisha AlQahtani 19 12 Freshman ID Name Age CH Academic Year 1 2 Abdulla Al-Naimi Aisha AlQahtani 20 19 18 12 Sophomore Freshman total number of students is: 2 16 public class Runner 17 18 public static void main(String[] args) t 19 20 21 //print top header Student.printHeader); 23 24 25 26 //Create a student and print his info //Parameters here are: Name, age, number of courses enrolled in, and academic year (first year, second year, etc) //Pay attention that the ID is auto generated Student s1 new. Student"Abdulla Al Naimi"..20.6...2) 2x327 28 29 30 31 32 //Print info will print the ID, name, Age, Credit Hours, and Academic year //credit hours is the number of classes the student is enrolled in 3 s1.printStudentInfo); System.out.println); 34 35 36 37 38 39 40 41 42 //Create second student and print her info Student s2 new Student) s2.printStudentInfo); System.out.println); //Set number of enrolled classes for Aisha to 4 System.out.println("Setting number of enrolled classes of Aisha to 4") s2.setNumEnroledClasses (4); s2.printstudentnfo0 System.out.println); 343 45 46 47 //Set number of enrolled classes of Aisha to 10! System.out.println "Set enrolled classes to 10!") s2.setNumEnrolledClasses (10); s2.printStudentInfo); System.out.println) 51 52 53 54 //Set the age of Aisha to 22 System.out.println("Setting Aisha's age to 19"); s2.setAge(19); s2.printStudentInfo) System.out.println); 56 357 58 59 60 61 62 63 //print all students in system System.out.println("In "); Student.printHeader); s1.printStudentInfo) s2.printStudentInfo) System.out.println("Intotal number of students is: " + Student.totalNumOfStudents); 364 x65 67 68
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
