Copyright  © – Sudharsan Iyengar

 

CS – 234.                    Assignment 2 – Developing and using Objects         Due: 10/13/24

 

Write a class that represents a basketball team with 5 players. The information about the team is as follows.

 

            Team Name – String              Wins – int       Losses – int

            There should be 5 players in the team.

           

Write constructor(s), setters, and getters for these fields.

 

Write a class that represents a basketball player. The information about the player is as follows.

 

            Player Name – String             Player Number – int   Points Scored – int.

            Rebounds – int                        Blocks - int

 

Write constructor(s), setters, and getters for this class.

 

Write an application program that reads a file “Team.txt” that reads information about the team and information about the players in the team. The first line in the file contains information about the team and is followed by 5 lines – each line contains information about a player.

 

The application then develops and presents a menu of team names that will allow the user to pick a team. It will then display the team information and then a menu of player name – to choose a player. It will display the player information.