Question: 1. Create a class named Course.java whose Data fields includes CourselD, CourseName, Description, and CreditHours. Include methods to get and set values for each of

1. Create a class named Course.java whose Data fields includes CourselD, CourseName, Description, and CreditHours. Include methods to get and set values for each of these fields. Create another class that will test objects created from the Course class called TestCourse.java. which will include a main method that instantiates one course object and demonstrates the use of the set and get methods. Call a display method to display the data. Code in main method will look like this: public static void main (String args[]) { Course c1 = new Course(); c1.setCourseld(109); c1.setCourseName("Intro to Python"); c1.setDescription("This course introduces the Python programming language"); c1.setCreditHours(4); c1.display(); Example output: The course ID is 109 The name is Intro to Python The description is 'This course introduces the Python programming language' It is a 4.0 credit hours course
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
