Chapter 10: Improve number and string formatting Update the program to improve the formatting of the numbers and the strings. Console MENU OPTIONS 1 Display lineup 2 Add player 3 Remove player 4- Move player 5 Edit player position 6- Edit player stats 7 Exit program POSITIONS C, 1B, 2B, 3B, SS, LF, CF, RF, P Menu option: 1 Player 1 Tommy La Stella 2 Mike Yastrzemski 3 Donovan Solano Baseball Team Manager 4 Buster Posey 5 Brandon Belt 6 Brandon Crawford 7 Alex Dickerson 8 Austin Slater 9 Kevin Gausman Menu option: 7 Bye! Specifications 2299238. POS 3B RF 2B с 1B SS LF CF P AB 563 1473 ===== 1316 360 H 586 569 56 168 407 4575 1380 3811 1003 4402 1099 160 147 2 AVG 0.274 0.281 0.276 0.302 0.263 0.250 0.273 0.274 0.036

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter6: Modularity Using Functions
Section: Chapter Questions
Problem 9PP
icon
Related questions
Question
Chapter 10: Improve number and string formatting
Update the program to improve the formatting of the numbers and the strings.
Console
MENU OPTIONS
1
2
3
4
5
6
7
Display lineup
Add player
Remove player
Move player
Edit player position
Edit player stats
Exit program
POSITIONS
C, 1B, 2B, 3B, SS, LF, CF, RF, P
Menu option: 1
Player
1
Tommy La Stella
2 Mike Yastrzemski
3
Donovan Solano
Baseball Team Manager
4
Buster Posey
5 Brandon Belt
6 Brandon Crawford
7 Alex Dickerson
8 Austin Slater
9 Kevin Gausman
Menu option: 7
Bye!
==============================
POS
3B
RF
2B
с
1B
SS
LF
CF
P
AB
H
1316 360 0.274
563 168
0.281
1473 407
0.276
0.302
4575 1380
3811 1003
4402 1099
160
147
2
586
569
56
AVG
0.263
0.250
0.273
0.274
0.036
Specifications
Use the repetition operator to make sure that horizontal separator lines use 64
characters.
•
Use spaces, not tabs, to align columns. This should give the program more control
over how the columns are aligned.
•
Make sure the program always displays the batting average with 3 decimal places.
• Display the positions by processing the tuple of valid positions.
Transcribed Image Text:Chapter 10: Improve number and string formatting Update the program to improve the formatting of the numbers and the strings. Console MENU OPTIONS 1 2 3 4 5 6 7 Display lineup Add player Remove player Move player Edit player position Edit player stats Exit program POSITIONS C, 1B, 2B, 3B, SS, LF, CF, RF, P Menu option: 1 Player 1 Tommy La Stella 2 Mike Yastrzemski 3 Donovan Solano Baseball Team Manager 4 Buster Posey 5 Brandon Belt 6 Brandon Crawford 7 Alex Dickerson 8 Austin Slater 9 Kevin Gausman Menu option: 7 Bye! ============================== POS 3B RF 2B с 1B SS LF CF P AB H 1316 360 0.274 563 168 0.281 1473 407 0.276 0.302 4575 1380 3811 1003 4402 1099 160 147 2 586 569 56 AVG 0.263 0.250 0.273 0.274 0.036 Specifications Use the repetition operator to make sure that horizontal separator lines use 64 characters. • Use spaces, not tabs, to align columns. This should give the program more control over how the columns are aligned. • Make sure the program always displays the batting average with 3 decimal places. • Display the positions by processing the tuple of valid positions.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 1 images

Blurred answer
Knowledge Booster
Types of Loop
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
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr