Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
- 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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started