subject

C++

This program will store roster of most popular videos with kittens. For each kitten we will store: name, color and cuteness score. A roster can include at most 10 kittens.

(1) Prompt the user to input five kittens info: A kitten's name, it's color and score. Store kitten names in one string array, colors in another string array and score in the third int array. Output these arrays (i. e., output the roster).

Ex:

Enter kitten 1's name:
Willow
Enter kitten 1's color:
white
Enter kitten 1's cuteness score:
10

Enter kitten 2's name:
Addie
Enter kitten 2's color:
grey
Enter kitten 2's cuteness score:
42

Enter kitten 3's name:
Pixie
Enter kitten 3's color:
black
Enter kitten 3's cuteness score:
99

Enter kitten 4's name:
Ella
Enter kitten 4's color:
white
Enter kitten 4's cuteness score:
76

Enter kitten 5's name:
Lola
Enter kitten 5's color:
blue
Enter kitten 5's cuteness score:
12

ROSTER
Kitten 1 -- Name: Willow, Color: white, Score: 10
Kitten 2 -- Name: Addie, Color: grey, Score: 42
...
(2) Implement a menu of options for a user to modify the roster. Each option is represented by a single character. The program initially outputs the menu, and outputs the menu after a user chooses an option. The program ends when the user chooses the option to Quit.

Ex:

MENU
a - Add kitten
d - Remove kitten
u - Update kitten color and cuteness score
r - Output kittens above a rating
o - Output roster
q - Quit

Choose an option:
(3) Implement the "Output roster" menu option.

Ex:

ROSTER
Kitten 1 -- Name: Willow, Color: white, Score: 10
Kitten 2 -- Name: Addie, Color: grey, Score: 42
...
(4) Implement the "Add kitten" menu option. If the user chooses this option and the roster is full, print the following error message:

Impossible to add new kitten: roster is full.
If the roster is not full, prompt the user for a new kitten's name, color and score, and append the values to the two arrays.

Ex:

Enter a new kitten's name:
Alladin
Enter the kittens's color:
white
Enter the kittens's cuteness score:
82
(5) Implement the "Remove kitten" menu option. If the user chooses the option when the roster is empty, immediately print the message:

Can not delete from empty roster.
If the roster is not empty, prompt the user for a kitten's name. Remove the kitten from the roster (delete the responding color and cuteness score), paying attention not to leave unused spaces in the two arrays.

Ex:

Enter a kitten's name:
None
If the given name is not found, inform the user:

Error! Kitten None not found.
(6) Implement the "Update kitten color and cuteness score" menu option. Prompt the user for a kitten's name Prompt again for a new color and score for the kitten, and then look up and change that kitten's data.

Ex:

Enter a kitten name:
Alladin
Enter a new color for the kitten:
brown
Enter a new cuteness score for the kitten:
98
In this case, if the given name is not found, no further action is taken (note that the format of the program requires the user to enter color and score either way).

(7) Implement the "Output kittens above a rating" menu option. Prompt the user for a rating. Print the position, name, color and cuteness score for all kittens with score equal or above the entered value.

Ex:

Enter a rating:
50

ABOVE 50
Kitten 3 -- Name: Pixie, Color: black, Score: 99
Kitten 4 -- Name: Ella, Color: white, Score: 76
Kitten 6 -- Name: Alladin, Color: brown, Score: 98
...
If no kittens are found above a given rating, the program will simply produce an empty list.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 10:40
Program using c++ only on visual studio pig is a simple two player dice game, played with one die. the first player to reach or surpass 50 is the winner. each player takes a turn rolling the dice. they add to the pot with each roll, having to decide to roll again and increase the pot, or cash out. the risk being they could lose the amount they’ve accumulated into the pot. the rules for each player’s die roll. 1. roll the dice. a. if user rolled a 1, i. the pot gets set to zero ii. the other player goes to step 1. b. a roll of 2-6 is added to the pot. 2. user can choose to hold or roll again. a. choice roll. return to step 1. b. choice hold. i. increment player score by the pot amount. ii. pot gets set to 0. iii. second player gets to roll and goes to step 1. program requirements: ● before each opponent begins β—‹ output the score for the person and the computer. β—‹ output the opponents whose turn is beginning and ask the user to hit enter to continue. ● with each dice roll. β—‹ output the die value, and amount of the round pot. β—‹ if it’s the users roll ask if they want to roll again ( r ) or hold ( h ). your program should allow r, r, h or h as valid input. if input is anything else, ask the user again until valid input is obtained. β—‹ the ai will continue playing until the round pot is 20 or more. ● once a player’s score is greater or equal to 50 then they have won, it will no longer ask if they want to keep rolling the die or not. ● once there is a winner β—‹ score totals are output along with who the winner was. user or computer β—‹ player is asked if they want to play again y or n. valid input should be y, y, or n, n. ● when a new game starts the starting roll goes to the player that did not roll last. if the user rolled last in the previous game, then the computer rolls first and vice versa. when the program first begins, the player will make the first roll of the first game. development notes : ● you will need a way to roll dice in your program. the rand() function works well, but returns an integer. if we want numbers 0 – 9 we can get the value modulus 10. ● call srand() with a value to seed it. it’s common to seed it with the current computer clock, include ctime, and then call srand(time(
Answers: 1
question
Computers and Technology, 23.06.2019 18:30
Report all segments of identity by descent longer than 20 polymorphisms between pairs of individuals in the following cohort of 15 individuals across 49 polymorphisms: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 numeric input 2 points possible (graded) you have 2 attempts to complete the assignment below. for example if the sequence is "bcd", which occurs in "abcdef" , the starting point would be 2 (b), and the finishing point would be 4(d). individuals 7,10 between positions
Answers: 1
question
Computers and Technology, 24.06.2019 02:00
Which steps will open the system so that you can enter a question and do a search for
Answers: 1
question
Computers and Technology, 24.06.2019 07:00
Why would a business likely use a java applet - to back up their data files for the business - to create a program that a customer can launch in their web browser - to create music on a powerpoint presentation - to organize files on their company directory
Answers: 3
You know the right answer?
C++

This program will store roster of most popular videos with kittens. For each kitten...
Questions
question
History, 20.01.2021 08:50
question
Advanced Placement (AP), 20.01.2021 08:50
question
Mathematics, 20.01.2021 08:50
question
History, 20.01.2021 08:50
question
Mathematics, 20.01.2021 08:50
question
Mathematics, 20.01.2021 08:50
Questions on the website: 13722360