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 08:30
1.the index finger on your right hand types the f r v 4 j u m 7 h y 6 n lo.9 j u 7 m g t 5 b 2.if you need to multiply 400, 2, and 1 ½, what would you type on the numeric keypad? 400*2*1.5 400/2*1.5 400/2/1.5 400*2*1½ 3.select all examples of proper keyboarding technique. rest your fingers gently on the home row or home keys. slouch in your chair. rest your palms on the keyboard. relax your fingers. keep your hands lower than your elbows.
Answers: 1
question
Computers and Technology, 22.06.2019 21:30
Write a function named printfloatrepresentation(float number) that will print the floating point representation of a number using the format given below. (sign bit) exponent in binary (assumed bit).significandfor example if the number passed an argument is 71 yourprogram should print (0) 10000101 (1).00011100000000000000000similarly if the number passed to the function as argument is -71 the program should print (1) 10000101 (1).00011100000000000000000
Answers: 3
question
Computers and Technology, 24.06.2019 07:00
Into what form does the barcode reader convert individual bar patterns?
Answers: 1
question
Computers and Technology, 24.06.2019 15:00
Universal windows platform is designed for which windows 10 version?
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, 22.08.2019 23:30
Questions on the website: 13722363