Question: Given main(), define a course base class with methods to set and get the courseNumber and course Title. Also define a derived class OfferedCourse with

 Given main(), define a course base class with methods to set

and get the courseNumber and course Title. Also define a derived class

OfferedCourse with methods to set and get instructorName, term, and classTime. Ex.If the input is: ECE 287 Digital Systems Design ECE 387 Embedded

Systems Design Mark Patterson Fall 2018 WF: 2-3:30 pm the output is:

Course Information: Course Number: ECE287 Course Title: Digital Systems Design Course Information:

Given main(), define a course base class with methods to set and get the courseNumber and course Title. Also define a derived class OfferedCourse with methods to set and get instructorName, term, and classTime. Ex. If the input is: ECE 287 Digital Systems Design ECE 387 Embedded Systems Design Mark Patterson Fall 2018 WF: 2-3:30 pm the output is: Course Information: Course Number: ECE287 Course Title: Digital Systems Design Course Information: Course Number: ECE 387 Course Title: Embedded Systems Design Instructor Name: Mark Patterson Term: Fall 2018 Class Time: WF: 2-3:30 pm File is marked as read only Current file: Courselnformation.java Hemin 0009 1 import java.util.Scanner; 2 3 public class Course Information { 4 public static void main(String[] args) { Scanner scnr = new Scanner(System.in); 6 7 8 Course myCourse = new Course(); OfferedCourse myofferedCourse = new OfferedCourse(); 10 11 12 String courseNumber, courseTitle; String CourseNumber, CourseTitle, instructorName, term, classTime; courseNumber = scnr.nextLine(); courseTitle = scor.nextLine(); 13 14 15 16 17 oCourseNumber = CourseTitle scnr.nextLine(); scnr.nextLine(); = 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 File is marked as read only Current file: Courselnformation.java instructorName = scnr.nextLine(); term = scnr.nextLine(); classTime - scnr.nextLine(); myCourse.setCourseNumber(courseNumber); myCourse.setCourseTitle(courseTitle); myCourse.printInfo(); myoffered Course.setCourseNumber(oCourseNumber); myoffered Course.setCourseTitle(CourseTitle); myOffered Course.setInstructorName (instructorName); myoffered Course. setTerm(term); myOffered Course.setClassTime(classTime); myoffered Course.printInfo(); 34 System.out.println(" System.out.println(" System.out.println(". Instructor Name: + myOfferedCourse.getInstructorName)); Term: + myOffered Course.getTerm(); Class Time: " + myOfferedCourse.getClassTime(); 35 Current file: Course.java Load default template... 1 public class course{ 2 private String courseNumber; 3 private String courseTitle; 4 public void setCourseNumber(String courseNumber) { this.courseNumber= courseNumber; 6 } 5 7 9 10 8 public void setCourseTitle(String courseTitle) { this.courseTitle= courseTitle; } 11 public String getCourseNumber() { 12 return courseNumber; 13 } 14 public String getCourseTitle() { return courseTitle; 15 16 } 17 public void printInfo() { 18 System.out.println("Course Information: "); 19 System.out.println(" Course Number: " + courseNumber); 20 System.out.println(" Course Title: " + courseTitle); } 22 } 21 23 24 Current file: Offered Course.java Load default template... 1 public class Offered Course extends Course { 2 // TODO: Declare private fields - instructorName, term, classTime 3 4 // TODO: Define mutator methods - 5 setInstructor Name(), setTerm(), setClassTime() 6 7 8 // TODO: Define accessor methods - 9 getInstructor Name(), getTerm(), getClassTime() 10 11 ) min 10 000

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!