Problem Solving with C++, Student Value Edition
Problem Solving with C++, Student Value Edition
10th Edition
ISBN: 9780134543680
Author: Walter Savitch
Publisher: PEARSON
bartleby

Concept explainers

bartleby

Videos

Textbook Question
Book Icon
Chapter 8, Problem 19PP

Write a program that manages a list of up to 10 players and their high scores in the computer’s memory. Use two arrays to manage the list. One array should store the player’s name and the other array should store the player’s high score. Use the index of the arrays to correlate the name with the score. In Chapters 10 and 11, you will learn a different way to organize related data by putting them into a struct or class. Your program should support the following features:

a. Add a new player and score. If it is one of the top 10 scores then add it to the list of scores. The same name and score can appear multiple times. For example, if Bill played 3 times and scored 100, 100, and 99, and Bob played once and scored 50, then the top scores would be Bill 100, Bill 100, Bill 99, Bob 50.

b. Print the top 10 names and scores to the screen sorted by score with the highest score first.

c. Allow the user to enter a player name and output that player’s highest score if it is on the top 10 list or a message if the player’s name has not been input or is not in the top 10.

d. Allow the user to enter a player name and remove the highest score for that player from the list.

Create a menu system that allows the user to select which option to invoke.

Blurred answer
Students have asked these similar questions
Create a program that allows you to create a fantasy football roster based on the existing list of available players. Your team can only have 5 players, so create an array that can store 5 possible players. Prompt the user to pick 5 players to add to their team. If the player is available in the list of availablePlayers, then add that player to the users array, and remove that player from the availablePlayers list. Then prompt the user to pick another player. Once all five players have been added, then print the list in the console. Create a search method to find the index at which the player is located in the availablePlayers list so you can remove the player, and make sure that they are an eligible pick. Here is a sample run of the program: Enter Player you would like on your team: Cam Newton Great! That player is added to your team! Enter Player you would like on your team: Travis Kelce Great! That player is added to your team! Enter Player you would like on your team: Alvin Kamara…
Write a Java application to simulate the rolling of two dice. The application should use an object of class Random once to roll the first die and again to roll the second die. The sum of the two values should then be calculated. Each die can show an integer value from 1 to 6, so the sum of the values will vary from 2 to 12, with 7 being the most frequent sum, and 2 and 12 the least frequent.Your application should roll the dice 12 times. Use a one-dimensional array to tally the number of times each possible sum appears. Display the results in tabular format. */
Please Help Write a program to ask the user for the number of arrays he wants to maintain and then populate eacharray by taking elements from the user. Merge all these arrays in another array and finally remove duplicateelements from the merged array.

Chapter 8 Solutions

Problem Solving with C++, Student Value Edition

Ch. 8.1 - What string will be output when this code is run?...Ch. 8.1 - Prob. 12STECh. 8.1 - Consider the following code (and assume it is...Ch. 8.1 - Consider the following code (and assume it is...Ch. 8.2 - Consider the following code (and assume that it is...Ch. 8.2 - Prob. 16STECh. 8.2 - Consider the following code: string s1, s2...Ch. 8.2 - What is the output produced by the following code?...Ch. 8.3 - Is the following program legal? If so, what is the...Ch. 8.3 - What is the difference between the size and the...Ch. 8 - Create a C-string variable that contains a name,...Ch. 8 - Prob. 2PCh. 8 - Write a program that inputs a first and last name,...Ch. 8 - Write a function named firstLast2 that takes as...Ch. 8 - Write a function named swapFrontBack that takes as...Ch. 8 - Prob. 6PCh. 8 - Write a program that inputs two string variables,...Ch. 8 - Solution to Programming Project 8.1 Write a...Ch. 8 - Write a program that will read in a line of text...Ch. 8 - Give the function definition for the function with...Ch. 8 - Write a program that reads a persons name in the...Ch. 8 - Write a program that reads in a line of text and...Ch. 8 - Write a program that reads in a line of text and...Ch. 8 - Write a program that can be used to train the user...Ch. 8 - Write a sorting function that is similar to...Ch. 8 - Redo Programming Project 6 from Chapter 7, but...Ch. 8 - Redo Programming Project 5 from Chapter 7, but...Ch. 8 - Prob. 11PPCh. 8 - Write a program that inputs a time from the...Ch. 8 - Solution to Programming Project 8.14 Given the...Ch. 8 - Write a function that determines if two strings...Ch. 8 - Write a program that inputs two strings (either...Ch. 8 - Write a program that manages a list of up to 10...
Knowledge Booster
Background pattern image
Computer Science
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
  • Text book image
    EBK JAVA PROGRAMMING
    Computer Science
    ISBN:9781337671385
    Author:FARRELL
    Publisher:CENGAGE LEARNING - CONSIGNMENT
Text book image
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781337671385
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT
9.1: What is an Array? - Processing Tutorial; Author: The Coding Train;https://www.youtube.com/watch?v=NptnmWvkbTw;License: Standard Youtube License