The Schedule class contains several courses. Each Course has a name, start time, and end time. The toString method for a Course should return a string containing the name, start time, and end time. For example, if the course is "Networking I" and it is held from 8am to 8:50am, the toString method for that course should return: "Networking I: 8am - 8:50am" The toString method for a Schedule should return "Your Schedule:" followed by all of the courses in the schedule. Below is an example showing what the Schedule's toString method should return if it contained five courses (Networking I, Database, Web Development, Java, and Yoga): "Your Schedule Networking I: 8am - 8:50am Database: 9am - 9:50am Web Development: 10am - 10:50am Java I: 12pm - 12:50pm Yoga: 1pm - 1:50pm" Include a Main.java to test your code
The Schedule class contains several courses. Each Course has a name, start time, and end time. The toString method for a Course should return a string containing the name, start time, and end time. For example, if the course is "Networking I" and it is held from 8am to 8:50am, the toString method for that course should return:
"Networking I: 8am - 8:50am"
The toString method for a Schedule should return "Your Schedule:" followed by all of the courses in the schedule. Below is an example showing what the Schedule's toString method should return if it contained five courses (Networking I,
"Your Schedule
Networking I: 8am - 8:50am
Database: 9am - 9:50am
Web Development: 10am - 10:50am
Java I: 12pm - 12:50pm
Yoga: 1pm - 1:50pm"
Include a Main.java to test your code
![Schedule
- courses List<Course>
+ Schedule(): Schedule
+ addCourse(course : Course) : void
+ to String(): String <<override>>
- name : String
- startTime: String
- endTime: String
Course
+ Course(name : String, startTime: String, endTime: String): Course
+ getName(): String
+ getStartTime(): String
+ getEndTime(): String
+ toString(): String <<override>>](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F5b9fc713-35a7-4152-955e-ea0356866640%2F26177a8c-7913-4c1d-938e-3670fc6e3f04%2F5s8s3xgl_processed.png&w=3840&q=75)
![](/static/compass_v2/shared-icons/check-mark.png)
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 4 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![C How to Program (8th Edition)](https://www.bartleby.com/isbn_cover_images/9780133976892/9780133976892_smallCoverImage.gif)
![Database Systems: Design, Implementation, & Manag…](https://www.bartleby.com/isbn_cover_images/9781337627900/9781337627900_smallCoverImage.gif)
![Programmable Logic Controllers](https://www.bartleby.com/isbn_cover_images/9780073373843/9780073373843_smallCoverImage.gif)