Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

c++ program: A basketball coach wants to implement a strategy to keep his oldest player fresh. His strategy is based on replacing the oldest player

c++ program:

A basketball coach wants to implement a strategy to keep his oldest player fresh. His strategy is based on replacing the oldest player on court from the bench after he plays 10% minutes of his age.

The numbers of players are from 1 to 12. A 5 will be selected randomly to play on court. Every time the time is up for the oldest, the coach will select the second bench player alternatively from left side or right side of the bench. In the same way the times up player will be added alternatively to the left or the right side of the bench.

At the end of the game the coach needs a list of all the players with their numbers sorted by the minutes they played, and another list sorted by age, number and minutes played.

Classes needed:

class player with number, age and minutes.

class courtPlayer and classs BenchPlayer which inherit from player add a status 'C' or 'B'

Data structures needed:

-The locker room where the players are waiting is an array of 12 players

-a sorted circular linked list of 5 players on court sorted by player number from the center

-an unsorted doubly linked list of 7 players on the bench

Main program:

The main program consists of 4 quarters of 12 minutes each. the coach starts the first quarter by creating randomly the linkedlist of courtplayers and eventually the doubly linked list of benchplayer. the second quarter should start with the end of the first quarter of players.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

AWS Certified Database Study Guide Specialty DBS-C01 Exam

Authors: Matheus Arrais, Rene Martinez Bravet, Leonardo Ciccone, Angie Nobre Cocharero, Erika Kurauchi, Hugo Rozestraten

1st Edition

1119778956, 978-1119778950

More Books

Students also viewed these Databases questions

Question

How to find if any no. is divisble by 4 or not ?

Answered: 1 week ago

Question

Explain the Pascals Law ?

Answered: 1 week ago

Question

What are the objectives of performance appraisal ?

Answered: 1 week ago

Question

Did the team members feel that their work mattered

Answered: 1 week ago

Question

3. What may be the goal of the team?

Answered: 1 week ago