Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Design a user defined class called Course. Each course object will hold data about a course. The data includes courseID, courseName, credits and instructorName. Define

Design a user defined class called Course. Each course object will hold data about a course. The data includes courseID, courseName, credits and instructorName. Define the instance variables required of appropriate type. Provide only get methods along with toString( ) and equals( ) methods. Use JavaDoc style comments.

Design another user defined class called Student. Each student object will hold data on studentID, name, GPA, gender, and courseList. Make sure to define studentID of int type, name as String, gender as a char type and courseList as an array of Course. Declare a static variable named nextID initialized to 1000. nextID will be incremented inside the constructor and its value would be assigned to studentID. Please note the constructor will not require a separate parameter to initialize studentID. Provide only get methods. Also implement the toString( ) and equals( ) methods. Use JavaDoc style comments.

Create a client program with main method. Start by creating Course objects for each of the courses you are taking this semester. Next create two Student objects. Use the course objects you created to populate the courseLists for the two student objects. Demonstrate the various methods of the Student class.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Web Database Development Step By Step

Authors: Jim Buyens

1st Edition

0735609667, 978-0735609662

More Books

Students also viewed these Databases questions

Question

=+6. Are there areas where individual trustees seem to be meddling?

Answered: 1 week ago

Question

=+ e. What happens to Oceanias real exchange rate?

Answered: 1 week ago