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, 21.06.2019 21:00
Analyze the following code. int x = 1; while (0 < x) & & (x < 100) system.out.println(x++); a. the loop runs forever. b. the code does not compile because the loop body is not in the braces. c. the code does not compile because (0 < x) & & (x < 100) is not enclosed in a pair of parentheses. d. the numbers 1 to 99 are displayed. e. the numbers 2 to 100 are displayed.
Answers: 3
question
Computers and Technology, 22.06.2019 14:20
Consider a byte-addressable computer with 16mb of main memory, a cache capable of storing a total of 64kb of data and block size of 32 bytes. (a) how many bits in the memory address? (b) how many blocks are in the cache? (c) specify the format of the memory address, including names and sizes, when the cache is: 1. direct-mapped 2. 4-way set associative 3. fully associative
Answers: 2
question
Computers and Technology, 24.06.2019 18:20
7. design a circuit with three inputs (x, y, and z) representing the bits in a binary number, and three outputs (a, b, and c) also representing bits in a binary number. when the input is 1, 2, or 3, the binary output should be one lesser than the input. when the input is 4, 5, or 6, the binary output should be one greater than the input. when the input is 0, the output is 0, and when the input is 7, the output is 7. show your truth table, all computations for simplification, and the final circuit.
Answers: 2
question
Computers and Technology, 24.06.2019 23:00
People should never use telepresence when virtually meeting with a group of co-workers. true false
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, 09.02.2021 05:10
question
Mathematics, 09.02.2021 05:10
question
Computers and Technology, 09.02.2021 05:10
Questions on the website: 13722367