![Computers and Technology](/tpl/images/cats/informatica.png)
Computers and Technology, 15.07.2021 15:20, destineenikole17
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()
]
![answer](/tpl/images/cats/otvet.png)
Answers: 2
Other questions on the subject: Computers and Technology
![image](/tpl/images/cats/informatica.png)
Computers and Technology, 22.06.2019 03:00, Emanuelle7843
Which action describes an aspect of technological design?
Answers: 1
![image](/tpl/images/cats/informatica.png)
Computers and Technology, 22.06.2019 13:00, Cookie320
Write a program which asks you to enter a name in the form of first middle initial last. so you might enter for example samuel p. clemens. use getline to read in the string because it contains spaces. also, apparently the shift key on your keyboard doesnโt work, because you enter it all lower case. pass the string to a function which uses .find to locate the letters which need to be upper case and use toupper to convert those characters to uppercase. the revised string should then be returned to main in the form last, first mi where it will be displayed.
Answers: 1
![image](/tpl/images/cats/informatica.png)
Computers and Technology, 22.06.2019 15:30, micahpauleen748
In a compound condition, both conditions on either side of the logical operator and must be true for the overall condition to be true. a: true b: false
Answers: 1
![image](/tpl/images/cats/informatica.png)
Computers and Technology, 23.06.2019 05:00, mariahchaparro08
Which best explains why a digital leader would join a society specializing in technology
Answers: 1
Do you know the correct answer?
Given main(), define a Course base class with methods to set and get the courseNumber and courseTitl...
Questions in other subjects:
![Konu](/tpl/images/cats/mat.png)
Mathematics, 16.04.2020 07:01
![Konu](/tpl/images/cats/mat.png)
Mathematics, 16.04.2020 07:01
![Konu](/tpl/images/cats/mat.png)
Mathematics, 16.04.2020 07:01
![Konu](/tpl/images/cats/istoriya.png)
History, 16.04.2020 07:02
![Konu](/tpl/images/cats/himiya.png)
![Konu](/tpl/images/cats/mat.png)
Mathematics, 16.04.2020 07:02
![Konu](/tpl/images/cats/istoriya.png)
![Konu](/tpl/images/cats/mat.png)
![Konu](/tpl/images/cats/mat.png)
![Konu](/tpl/images/cats/biologiya.png)
Biology, 16.04.2020 07:02