subject

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 classTime. Ex. If the input is:
ECE287 Digital Systems Design ECE387 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: ECE387 Course Title: Embedded Systems Design Instructor Name: Mark Patterson Term: Fall 2018 Class Time: WF: 2-3:30 pm
import java. util. Scanner;
public class CourseInformation {
public static void main(String[] args) {
Scanner scnr = new Scanner(System. in);
Course myCourse = new Course();
OfferedCourse myOfferedCourse = new OfferedCourse();
String courseNumber, courseTitle;
String oCourseNumber, oCourseTitle, instructorName, term, classTime;
courseNumber = scnr. nextLine();
courseTitle = scnr. nextLine();
oCourseNumber = scnr. nextLine();
oCourseTitle = scnr. nextLine();
instructorName = scnr. nextLine();
term = scnr. nextLine();
classTime = scnr. nextLine();
myCourse. setCourseNumber(courseNumber);
myCourse. setCourseTitle(courseTitle);
myCourse. printInfo();
myOfferedCourse. setCourseNumber(oCourseNumber);
myOfferedCourse. setCourseTitle(oCourseTitle);
myOfferedCourse. setInstructorName(instructorName);< br /> myOfferedCourse. setTerm(term);
myOfferedCourse. setClassTime(classTime);
myOfferedCourse. printInfo();
System. out. println(" Instructor Name: " + myOfferedCourse. getInstructorName());
System. out. println(" Term: " + myOfferedCourse. getTerm());
System. out. println(" Class Time: " + myOfferedCourse. getClassTime());
}
}
public class Course{
// TODO: Declare private fields - courseNumber, courseTitle
// TODO: Define mutator methods -
// setCourseNumber(), setCourseTitle()
// TODO: Define accessor methods -
// getCourseNumber(), getCourseTitle()
// TODO: Define printInfo()
}
public class OfferedCourse extends Course {
// TODO: Declare private fields - instructorName, term, classTime
// TODO: Define mutator methods -
// setInstructorName(), setTerm(), setClassTime()
// TODO: Define accessor methods -
// getInstructorName(), getTerm(), getClassTime()
]

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 11:00
Which action is good business etiquette? a. switching your cell phone off before you enter a meeting b. keeping your cell phone on low volume before you enter a meeting c. setting a pleasant ring tone on your cell phone before you enter a meeting d. setting a standard ringtone on your cell phone before you enter a meeting
Answers: 1
question
Computers and Technology, 23.06.2019 01:00
Let r be a robotic arm with a fixed base and seven links. the last joint of r is a prismatic joint, the other ones are revolute joints. give a set of parameters that determines a placement of r. what is the dimension of the configuration space resulting from your choice of parameters?
Answers: 3
question
Computers and Technology, 23.06.2019 13:30
Font size, font style, and are all aspects of character formatting.
Answers: 2
question
Computers and Technology, 23.06.2019 23:30
Match the following errors with their definitions. a. #name b. #value c. #ref d. 1. when a formula produces output that is too lengthy to fit in the spreadsheet cell 2. when you enter an invalid cell reference in a formula 3. when you type text in cells that accept numeric data 4. when you type in a cell reference that doesn’t exist
Answers: 1
You know the right answer?
Given main(), define a Course base class with methods to set and get the courseNumber and courseTitl...
Questions
question
Mathematics, 03.07.2019 14:30
question
Mathematics, 03.07.2019 14:30
Questions on the website: 13722363