Microsoft Visual C#
Microsoft Visual C#
7th Edition
ISBN: 9781337102100
Author: Joyce, Farrell.
Publisher: Cengage Learning,
expand_more
expand_more
format_list_bulleted
Bartleby Related Questions Icon
Related questions
Question
Transcribed Image Text:Part 1.2. Write a main() method inside of the HybridCourse class, having the following:
1. Create an instance for HybridCourse using the constructor with all data fields.
2. Create an instance for OnlineCourse using the constructor with all data fields.
3. Print the two instances using toString method and match the example output:
@Javadoc Declaration Console X Properties
<terminated> Course [Java Application] /Users/kuan/.p2/pool/plugins/org.eclipse.justj.openjdk.hotspot.jre.full.macosx.x86_64_17.0.4.v20220805-1047/jre/bin/java (Nov 13,
HybridCourse [courseName=CPS1000, section Number=1, instructorName=Tom, percentOfRemoteLearning=50]
OnlineCourse [courseName=CPS1001, section Number=2, instructorName=Jack, platform-Zoom, meeting Link-www.xxx.com]
Transcribed Image Text:Task 1: Abstract Class (15 Points)
HybridCourse
percentOfRemoteLearning: int
+HybridCourse()
+HybridCourse(courseName: String, sectiomNumber: int,
instructorName: String, percentOfRemoteLearning: int)
+getCapacity() int
+getPercentOfRemoteLearning(): int
+setPercentOfRemoteLearning (percentOfRemoteLearning:
int): void
+toString(): String
Course
-courseName: String
- sectionNumber: int
- instructorName: String
- numberOfStudentsEnrolled: int
#Course()
#Course(courseName: String)
#Course(courseName: String, sectionNumber: int,
instructorName: String)
+getCapacity(): int
+get CourseName(): String
+set CourseName(courseName: String): void
+getSection Number(): int
+setSection Number(section Number: int): void
+getInstructorName(): String
+setInstructorName(instructorName: String): void
+getNumberOfStudentsEnrolled(): int
+toString(): String
- platform: String
Online Course
- meetingLink: String
sectionNumber: int,
+ OnlineCourse()
+ OnlineCourse(courseName: String,
instructorName: String,
platform: String,
meetingLink: String)
#getMeetingLink(): String
#setMeetingLink (meetingLink: String): void
+getCapacity(): int
+toString(): String
Task 1 Abstract Class, Abstract Method and Inheritance
Part 1.1. Implement the Course, HybridCourse, OnlineCourse inheritance structure strictly
according to its UML diagram in three different .java files. Add comments stating where data
fields, constructors, toString(), and other methods are (if any).
Neither method should have an empty body unless abstract methods.
Note: You should implement the abstract class Course, regular class HybridCourse, and
regular class OnlineCourse.
Note: the getCapacity() in the HybridCourse and OnlineCourse should return an integer
value representing the maximum student number in the class.
toString() Methods should be implemented properly in order to match the output requirements in
Part 1.2.
Expert Solution
Check MarkThis question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
bartleby
Step by stepSolved in 2 steps
Knowledge Booster
Background pattern image
Recommended textbooks for you
- Text book imageMicrosoft Visual C#Computer ScienceISBN:9781337102100Author:Joyce, Farrell.Publisher:Cengage Learning,Text book imageEBK JAVA PROGRAMMINGComputer ScienceISBN:9781337671385Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENTText book imageProgramming Logic & Design ComprehensiveComputer ScienceISBN:9781337669405Author:FARRELLPublisher:Cengage
- Text book imageC++ for Engineers and ScientistsComputer ScienceISBN:9781133187844Author:Bronson, Gary J.Publisher:Course Technology PtrText book imageSystems ArchitectureComputer ScienceISBN:9781305080195Author:Stephen D. BurdPublisher:Cengage LearningText book imageC++ Programming: From Problem Analysis to Program...Computer ScienceISBN:9781337102087Author:D. S. MalikPublisher:Cengage Learning
Text book image
Microsoft Visual C#
Computer Science
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Cengage Learning,
Text book image
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781337671385
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT
Text book image
Programming Logic & Design Comprehensive
Computer Science
ISBN:9781337669405
Author:FARRELL
Publisher:Cengage
Text book image
C++ for Engineers and Scientists
Computer Science
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Course Technology Ptr
Text book image
Systems Architecture
Computer Science
ISBN:9781305080195
Author:Stephen D. Burd
Publisher:Cengage Learning
Text book image
C++ Programming: From Problem Analysis to Program...
Computer Science
ISBN:9781337102087
Author:D. S. Malik
Publisher:Cengage Learning