0% found this document useful (0 votes)
12 views2 pages

CPP Assignment2

Cpp Assignment2

Uploaded by

yashubgoel43
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views2 pages

CPP Assignment2

Cpp Assignment2

Uploaded by

yashubgoel43
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Calendar for Summer Olympics(C++ Assignment-2)

Course Name: EGC 211, Programming 2A(C++)


Student Name: Yashub Goel
Student ID: IMT2023117

19 Aug 2024

Abstract
This document outlines the object-oriented design for managing venues and events in a calendar system
tailored for the summer Olympics. The system includes three main entities: Calendar, Venue, and Event,
with their interactions detailed in a UML class diagram.

1 Design Overview
The design features three key entities:
• Calendar: Manages venues and their events. It contains a linked list of Venue objects and provides
methods for searching, adding, and deleting venues, as well as displaying the event calendar.
– Attributes:
1. head: pointer to the first Venue
2. noOfVenues: total count of venues
– Methods:
1. calendar(): Initializes the calendar.
2. searchVenues(string): Finds a venue by name.
3. addVenue(string, string, int): Adds a new venue.
4. delVenue(string): Removes a venue.
5. showVenues(): Lists all venues.
6. showCalendar(string): Displays events for a venue.

• Venue: Represents a location where events are held. Each venue can schedule multiple events and is
linked to the next Venue in the list.
– Attributes:
1. name: the venue’s name.
2. location: the place where the venue is located
3. capacity: the seating capacity of the venue
4. noOfEvents[31]: no of events scheduled on each day of the month
5. next: pointer to the next venue in a linked list fashion
– Methods:
1. venue(string, string, int): Initializes a venue.
2. addEvent(string, int, int, int): Schedules an event.
3. delEvent(string, int, int): Removes an event.
4. showEvents(int): Lists events for a specific day.
• Event: Represents an individual event scheduled at a venue.

International Institute of Information Technology, Bangalore Page 1


Figure 1: UML diagram for classes in Calendar for summer-olympics.cpp

– Attributes:
1. name.
– Methods:
1. event(string): Initializes an event.
• Entity Relationships:
– Calendar has a one-to-many composition relationship with Venue (a calendar can manage multiple
venues and deleting the calendar results in deletion of all associated venues).
– Venue also has a one-to-many composition relationship with Event (a venue can host multiple events
and deleting a venue results in deletion of all the events scheduled in that venue).

2 Conclusion
This design provides a structured approach for managing the complex scheduling of venues and events in the
summer Olympics, with clear separation of responsibilities among the Calendar, Venue, and Event classes.

International Institute of Information Technology, Bangalore Page 2

You might also like