CS201 Assignment 3 Solution Spring 2020

Опубликовано: 05 Июль 2026
на канале: Learning School
106
2

#CS201 #assg 3 #c #C++
Assignment Statement:
Assume you are working as a sports data analyst for a university named “ABC University”. Your job is to collect data of different players and judge their performance. Based on the data collected from players, their performance for a given season will be analyzed and comparison among players of the team will be made for selection. For this purpose, you are required to write a program in C++ that will create a class named “Sports”. The class will create a file named “Sample.txt” in the current directory. You will use file handling mechanism for entering player’s information. Following tasks are required:

• You are required to create a class named “Sports”.
• Declare three data members of Sports class named playername, game_name and total_wins with appropriate data types.
• The class will consist of 6 functions named input_file(), read_file(), notstartingwithA(), lower(), upper() and digit() respectively along with a default constructor. The description of each function is given with the screenshots in the “Sample output”.
• In the main() function an object of the class “Sports” will be created and it will be used along with switch statement to call the functions mentioned above. i.e. input_file(), read_file(), notstartingwithA(), lower(), upper() and digit().
• Initially a menu will be displayed consisting of different choices as shown below:


Download link : https://drive.google.com/file/d/1pHeh...