Given main(), define a course base class with methods to set and get the courseNumber and courseTitle. Also define a derived class offeredCourse with methods to set and get instructorName, term, and class Time. Ex. If the input is: ECE287 Digital Systems Design ECE387 Embedded Systems Design Mark Patterson Fall 2018 HE: 2-3:30 pm the output is Course Information: Course Number: ECE287 Course Title: Digital Systems Design Course Information: Course Number: ECE387 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 1 import java.util.Scanner; 2 3 public class CourseInformation ( 8 9 10 11 12 13 14 15 16 17 18 19 21 22 23 25 26 27 28 30 31 32 33 35 36 37 public static void main(String[] args) { Scanner scnr = new Scanner(System.in); } Current file: CourseInformation.java - Course myCourse - new Course(); OfferedCourse myOfferedCourse new OfferedCourse(); String courseNumber, courseTitle: String CourseNumber, oCourseTitle, instructorNane, term, classTine; courseNumber scnr.nextLine(); courseTitle scar.nextLine(); oCourseNumber scnr.nextLine(); oCourseTitle InstructorNane scnr.nextLine(); scar.nextLine(); tern scor.nextLine(); classTime scar.nextLine(); myCourse.setCourseNumber(courseNumber); myCourse.setCourseTitle(courseTitle); myCourse.printInfo(); myOfferedCourse.setCourseNumber(oCourseNumber); myOfferedCourse.setCourseTitle(oCourseTitle); myOfferedCourse.setInstructorName(instructorName); myOfferedCourse.setTern(tern); myOfferedCourse.setClassTime(classTime); myOfferedCourse.printInfo(); System.out.println(" Instructor Name:" nyOfferedCourse.getInstructorName()); System.out.println(" Term: yOfferedCourse.getTerm()); System.out.println(" Class Time: myOfferedCourse.getClassTine()); 1 public class Course 2 // TODO: Declare private fields courseNumber, courseTitle // TODO: Define mutator setCourseTitle() methods - 11 setCourseNumber(), 3 4 5 6 7 8 9 10 11 12 13 14 5 6 7 9 10 11 12 13 14 15 16 17 18 19 20 24 25 26 27 28 29 30 31 32 33 34 35 // TODO: Define accessor methods 11 1 public class offeredCourse extends Course private String instructorName, term, classTine; private String oCouseTitle; 36 37 38 39 // TODO: Define printInfo() } public void setCourseNumber(String CourseNumber) { } getCourseNumber(), getCourseTitle() public void setCourseTitle(String CourseTitle) { this.ocouseTitle -oCourseTitle; } Current file: Course.java - public void setInstructorName(String instructorName) { this. instructorName InstructorName; } Current file: Offered Course.java public void setTerm(String tern) { this.tere term; } public void setClassTime(String classTime) ( this.classTine classTine; public void printInfo() { } public String getInstructorName() { return instructorName; public String getTern() { return term; } public String getClassTime() { return classTine; } Load default template. Load default template....
Given main(), define a course base class with methods to set and get the courseNumber and courseTitle. Also define a derived class offeredCourse with methods to set and get instructorName, term, and class Time. Ex. If the input is: ECE287 Digital Systems Design ECE387 Embedded Systems Design Mark Patterson Fall 2018 HE: 2-3:30 pm the output is Course Information: Course Number: ECE287 Course Title: Digital Systems Design Course Information: Course Number: ECE387 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 1 import java.util.Scanner; 2 3 public class CourseInformation ( 8 9 10 11 12 13 14 15 16 17 18 19 21 22 23 25 26 27 28 30 31 32 33 35 36 37 public static void main(String[] args) { Scanner scnr = new Scanner(System.in); } Current file: CourseInformation.java - Course myCourse - new Course(); OfferedCourse myOfferedCourse new OfferedCourse(); String courseNumber, courseTitle: String CourseNumber, oCourseTitle, instructorNane, term, classTine; courseNumber scnr.nextLine(); courseTitle scar.nextLine(); oCourseNumber scnr.nextLine(); oCourseTitle InstructorNane scnr.nextLine(); scar.nextLine(); tern scor.nextLine(); classTime scar.nextLine(); myCourse.setCourseNumber(courseNumber); myCourse.setCourseTitle(courseTitle); myCourse.printInfo(); myOfferedCourse.setCourseNumber(oCourseNumber); myOfferedCourse.setCourseTitle(oCourseTitle); myOfferedCourse.setInstructorName(instructorName); myOfferedCourse.setTern(tern); myOfferedCourse.setClassTime(classTime); myOfferedCourse.printInfo(); System.out.println(" Instructor Name:" nyOfferedCourse.getInstructorName()); System.out.println(" Term: yOfferedCourse.getTerm()); System.out.println(" Class Time: myOfferedCourse.getClassTine()); 1 public class Course 2 // TODO: Declare private fields courseNumber, courseTitle // TODO: Define mutator setCourseTitle() methods - 11 setCourseNumber(), 3 4 5 6 7 8 9 10 11 12 13 14 5 6 7 9 10 11 12 13 14 15 16 17 18 19 20 24 25 26 27 28 29 30 31 32 33 34 35 // TODO: Define accessor methods 11 1 public class offeredCourse extends Course private String instructorName, term, classTine; private String oCouseTitle; 36 37 38 39 // TODO: Define printInfo() } public void setCourseNumber(String CourseNumber) { } getCourseNumber(), getCourseTitle() public void setCourseTitle(String CourseTitle) { this.ocouseTitle -oCourseTitle; } Current file: Course.java - public void setInstructorName(String instructorName) { this. instructorName InstructorName; } Current file: Offered Course.java public void setTerm(String tern) { this.tere term; } public void setClassTime(String classTime) ( this.classTine classTine; public void printInfo() { } public String getInstructorName() { return instructorName; public String getTern() { return term; } public String getClassTime() { return classTine; } Load default template. Load default template....
C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter10: Classes And Data Abstraction
Section: Chapter Questions
Problem 10SA:
Consider the definition of the class product Type as given in Exercise 8.
Answer the following...
Related questions
Question
Java (derived classes) - Course Information
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 1 images
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning