Track of turns within a group of people

Assignment Help Basic Computer Science
Reference no: EM131427320

When you play a board or card game or when you use a shared computing resource, you get a turn and then wait until everyone else has had a turn. Although the number of players in a game remains relatively static, the number of users of a shared computing service fluctuates. Let's assume that this fluctuation will occur.

Design an ADT that keeps track of turns within a group of people. You should be able to add or delete people and determine whose turn occurs now.

Begin with a given group of people; assign these people an initial order. (This order can be random or specified by the user.) The first new person joining the group should get a turn after all others have had an equal number of turns. Each subsequent new person should get a turn after the person who joined the group most recently has had a turn.

Also design an ADT to represent a person. (You can be conservative with the amount of data that this ADT contains.) The data that your first ADT stores is made up of instances of the ADT person.

Implement your ADTs as C++ classes. Write a program that uses-and therefore tests-your ADTs completely. Your program should process several insertion and deletion operations, and demonstrate that people are given turns correctly.

Reference no: EM131427320

Questions Cloud

Identify and discuss the impacts of diversity and ethics : Identify and discuss the impacts of diversity, ethics, and cultural competency on the decision-making process related to your selected problem.
Standards and frameworks with an organization : Discuss the advantages and disadvantages of Standards and Frameworks with an organization.
What would be the fair criminal justice sentence to john : John has a previous history of drunk driving. He had joined the alcoholic anonymous groups to get over alcoholism but that has been of no help. After leaving the group, he again went back to drinking. He has earlier been involved in drunken drivin..
How each dividend would affect royal’s debt/equity ratio : Declare a 10 percent stock dividend. Royal Company would distribute one share of common stock for every 10 shares of common stock currently held. The company's common stock is currently selling for $50 per share.Royal Company is authorized to issu..
Track of turns within a group of people : Design an ADT that keeps track of turns within a group of people. You should be able to add or delete people and determine whose turn occurs now.
Why is it so difficult for mainstream american society : Why is it so difficult for "mainstream" American society to accept the validity and worth of other cultural traditions, especially those of indigenous peoples? Use examples from class or elsewhere to illustrate your points.
Prepare journal entries for each transaction : What is the significance of par value from a financial accounting standpoint? Is par value significant in any economic sense?
Preventing system problems : After the system has been completely installed, a team member states that the systems analysts will now be in charge only of "putting out fires" experienced within the new system. How would you react to this statement?
Write a memo that communicates the budget situation : Write a memo that communicates the budget situation to the rest of the team. Suggest three ways to improve an underperforming team member.

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Windows application that allows the user to explore knapsack

The user should be able to change the capacity of the knapsack, the sizes of the items, and the values of the items. The user should also create a list of item names that is associated with the items used in the program.

  Identify at least four candidate transport protocols

Identify at least four candidate transport protocols. Compare and contrast them in a table. Propose which transport protocol(s) to be used for data, voice, and video transport respectively and the rationale. Identify an existing similar software in t..

  Design a database design a database using the following info

Design a Database Design a database using the following information. Using Microsoft Visio 2013, create a complete E-R Diagram in Crow's Foot notation (including entity names, attributes, primary keys and foreign keys) that can be implemented, and th..

  Infrastructure vs competitive advantage

In what ways is IS/IT just infrastructure and in what ways is it a competitive advantage? Do you think it matters on how big or small an organization is for it to be a competitive advantage? What other factors with IS/IT works with or against it bein..

  Will that make the risk of type ii error higher or lower

The station plans to conduct this test using a 10% level of significance, but the company wants the significance level lowered to 5%. Why?

  Write declaration for two variables called miles

Write the declaration for two variables called miles and flow Rate. Declare the variable miles to be of type int and initialize it to zero in the declaration. Declare the variable flowRate to be of type double and initialize it to 50.56 in the dec..

  Propose a mechanism that might be used by datagram switches

Propose a mechanism that might be used by datagram switches so that if one switch loses all or part of its forwarding table, affected senders are informed of the failure.

  Draw the dmf for the discrete channel model

Give the block diagram of a discrete channel model for fading multipath channels and identify the tap gains of the model in terms of channel impulse response and front-end filtering at the transmitter and the receiver.

  Benefit from paying managers

If managers are risk- averse and owners are risk- neutral, will owners benefit from paying managers using a bonus plan instead of a flat salary? Why or why not?

  Find the instantaneous voltage at a time of 2.0 ms

From this expression, determine the peak voltage, the average voltage, and the angular frequency is rad/s. Find the instantaneous voltage at a time of 2.0 ms. (Reminder: the angles are in radians in this equation).

  Generates all permutations of the first n integers

Design an algorithm that generates all permutations of the first n integers taken r at a time and allowing unrestricted repetitions. This is sometimes referred to as sample generation. The values of n and r must be greater than zero.

  Short persuasive speech

First, you want to write a short persuasive speech, just two pages long, using any one of the following five speech types: (1) stimulate, (2) convince, (3) call to action, (4) increase consideration,

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd