Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
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