Question: Build a class called Course.java. This class should have 4 properties: CourseId, CourseName, Description, and credit hours . Also add the appropriate set and get

  1. Build a class called Course.java. This class should have 4 properties: CourseId, CourseName, Description, and credit hours. Also add the appropriate set and get methods. Add a display() method to display these 4 properties out to the DOS window. Lastly add a main() method for testing. In the main() method instantiate a Course object, fill it with data using the set methods, then call the display method to display the data.

// Code that goes in main() method

Course c1;

c1 = new Course();

c1.setCourseId(109);

c1.setCourseName(Intro to Python);

c1.setDescription(This course intros the Python Prog Lang.);

c1.setCreditHours(4);

c1.display();

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!