[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

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter8: Arrays
Section: Chapter Questions
Problem 7PE
icon
Related questions
Question

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;
    }
}

[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
read the comment sections carefully for descriptions.
d. Override the equals() method in MyCourse class. Two courses are equal if they have the
same course number, course name, and credit hours. You should use this method for all
courses comparisons.
e. Create a customized exception class CourseNotFoundException, throw this exception in
the dropCourse() method if the dropping course doesn't exist in the courseList. The
Transcribed Image Text:[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 read the comment sections carefully for descriptions. d. Override the equals() method in MyCourse class. Two courses are equal if they have the same course number, course name, and credit hours. You should use this method for all courses comparisons. e. Create a customized exception class CourseNotFoundException, throw this exception in the dropCourse() method if the dropping course doesn't exist in the courseList. The
thrown exception object should contain a meaningful message, including course number,
course name, and credit hours for the not found course. (hint: I demo the
InvalidSideException in Feb 24th lecture, please review for reference)
f. Submission with compile errors will receive at most 70% of the grade.
[3] Sample outputs for printBasicInfo) and printCourseList() methods:
John_Smith js = new John_Smith();
js.printBasicInfo();
Full Name: John Smith
Gender: Male
Phone Number: (210)000-0000
Email: jsmith@jaguar.tamu.edu
JNumber: JO00000
js.printCourselist();
John Smith's Course List
CSCI 1437 Programming Fundamentals II
4 hrs
CISA 2306 Computer Networks
3 hrs
CISA 2356 Systems Analysis and Design
3 hrs
Total
10 hrs
Transcribed Image Text:thrown exception object should contain a meaningful message, including course number, course name, and credit hours for the not found course. (hint: I demo the InvalidSideException in Feb 24th lecture, please review for reference) f. Submission with compile errors will receive at most 70% of the grade. [3] Sample outputs for printBasicInfo) and printCourseList() methods: John_Smith js = new John_Smith(); js.printBasicInfo(); Full Name: John Smith Gender: Male Phone Number: (210)000-0000 Email: jsmith@jaguar.tamu.edu JNumber: JO00000 js.printCourselist(); John Smith's Course List CSCI 1437 Programming Fundamentals II 4 hrs CISA 2306 Computer Networks 3 hrs CISA 2356 Systems Analysis and Design 3 hrs Total 10 hrs
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
Data members
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
Np Ms Office 365/Excel 2016 I Ntermed
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:
9781337508841
Author:
Carey
Publisher:
Cengage
Programming with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning