Question
The Olympics will be held in Tokyo next year and you are tasked with proposing a solution to manage the mega sports event [you're one
The Olympics will be held in Tokyo next year and you are tasked with proposing a solution to manage the mega sports event [you're one lucky programmer!]. There will be five different sports being competed at the Olympics but each of these games will take place at a specified venue and will offer Gold, Silver and Bronze medals. Each of the sports will be held for a fixed no. of days that is pre-decided. The five (5) games included in the Olympics are Hockey, Athletics, Judo, Badminton and Football. But in athletics, there are also further categories that are 100 meter race and relay race. The teams (nations) participating in the Olympics have no. of medals and rank as their key attributes. The rank specifies the team's overall standing among other competing nations. Teams are ranked based on their number of total medals.
a) Identify all classes, attributes and functions and write it as code. b) Write a global function named Reporter that displays the top 3 teams. c) Overload prefix ++ operator to add a medal to the team's medal tally. d) Overload > operator to compare two teams and return the one with higher number of medals. Print a message in case of a tie. e) Create run( ) method in Athletics class and override it in its child classes accordingly
programming language C++
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started