[1] Description: You're asked to create a basic Student's Enrollment System with the provided Student and Course classes. Please download the source code files from Blackboard. Create two new classes: (i) FirstName_LastName (replace by your name) that extends the Student class and (ii) MyCourse that extends the Course class. [2] Requirements: a. You're NOT allowed to change or add ANYTHING in the provided Student and Course classes. b. Provide a no-arg constructor for your FirstName_LastName class. The no-arg constructor should initialize all the data fields in Student class based on your information and your current semester's enrolled courses. c. Override 6 methods in Student class, as marked in the source code comments. Please
I need help with finishing my code in MyCourse I have some of the code done. Under is Course class I cant change anything in the class.
class MyCourse extends Course {
Course[] courses;
public MyCourse {
setCourseNumber("CISA 1437");
setCourseName("Programming Fundamentals II");
setCreditHrs("4");
}
public boolean equals(Object obj) {
Course c = (Course)obj;
return this.courseNumber.equals(c.courseNumber)
&& this.courseName.equals(c.courseName)
&& this.creditHrs == c.creditHrs)
}
class Course {
private String courseNumber;
private String courseName;
private int creditHrs;
public Course (String number, String name, int creditHrs){
this.courseNumber = number;
this.courseName = name;
this.creditHrs = creditHrs;
}
public String getNumber() {
return courseNumber;
}
public String getName() {
return courseName;
}
public int getCreditHrs() {
return creditHrs;
}
public void setCourseNumber(String courseNumber) {
this.courseNumber = courseNumber;
}
public void setCourseName(String courseName) {
this.courseName = courseName;
}
public void setCreditHrs(int creditHrs) {
this.creditHrs = creditHrs;
}
}
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 1 images