Chapter 7: Use a file to save the data
Update the program so it reads the player data from a file when the program starts and
writes the player data to a file anytime the data is changed.
Console
MENU OPTIONS
1 Display lineup
Add player
2
3 Remove player
4

5
6
7
POSITIONS
C, 1B, 2B, 3B, SS, LF, CF, RF, P
====
Menu option: 1
Player
1
2
4
Move player
Edit player position
Edit player stats
Exit program
8
9
Tommy
Mike
Donovan
Buster
Brandon
Brandon
Alex
Austin
Kevin
Baseball Team Manager
Menu option: 7
Bye!
Specifications
POS
3B
RF
2B
с
1B
SS
LF
CF
P
Use a CSV file to store the lineup.
AB
1316
563
1473
4575
3811
4402
586
569
56
H
360
168
407
1380
1003
1099
160
147
2
AVG
0.274
0.298
0.276
0.302
0.263
0.25
0.273
0.258
0.036
======
Store the functions for writing and reading the file of players in a separate module
than the rest of the program.

Answers

Answer 1

To store and update player data in a file:

Use a CSV file to store player data.Create a separate module to store the functions for writing and reading the file.Read the player data from the file when the program starts.Write the player data to the file anytime it is changed.Use concise code to ensure efficiency.What is a Program?

A program is a collection of instructions crafted in the proper programming language to order the computer system to fulfill an exact duty or attaining a predetermined output.

Programs vary from simplistic scripts to advanced software systems and applications – all of which are used for automating undertakings, modifying data, designing user interfaces.

Read more about programs here:

https://brainly.com/question/23275071

#SPJ1


Related Questions

Other Questions
"49. In a standing wave, the location where the particles of the medium are at rest iscalled the antinode. T/F The impact of New England on the rest of the nation can best be described asA) greatly exaggerated.B) generally negative.C) confined primarily to New England.D) extremely important.E) moderately important. 2. Suppose that the carrying capacity for Arctic hares in a particular ecosystem is estimated to be 1000. Biologists survey the population and find that population numbers are currently 450. max=birth rate - death rate logistic growth rate = ax N(K-N)/K If the annual birth rate of the population is 15 per capita, and the annual death rate is 8 per capita, what is the overall growth rate of this population? Round your result to the nearest whole number. (3 points) In the presence of good reported fetal movement, what is the most likely etiology of a nonreactive NST w/o accelerations? How much juice can a kid have per day? (3) Zi Lu said, "The ruler of Wei has been waiting for you, in order with you to administer the government. What will you consider the first thing to be done?" The Master replied, "What is necessary is to rectify names." "So! indeed!" said Zi Lu. "You are wide of the mark! Why must there be such rectification?" The Master said, "How uncultivated you are, You! A superior man, in regard to what he does not know, shows a cautious reserve. what is the thesis of the quote above? 3 supporting reasons ? Empirical evidence shows that in the short run, purchasing power parity _____, and in the long run, purchasing power parity _____.a. holds; does not holdb. holds; holdsc. does not hold; holdsd. does not hold; does not hold Potential for future complications for IUGR babies? Which of the following forms is used to report rents paid over $600 to landlords? a.Form 1099-G b.Form 1099-INT c.Form 1099-MISC d.Form. If a 6.00 volt battery will produce 0.300 A of current in a circuit, what is the resistance in the circuit? The true coelom that forms in embryonic development is x, and gives rise to x chambers Do you understand the integration as levels of explanation, prima scriptura (pg. 285), and faithful reading (pg. 290)? What would you do if there is an apparent discrepancy between psychology and theology? Is the Scripture authoritative? If so, when? Please help Graph x< -2 in new jersey, the realty transfer fee appears on the closing statement as a Only the _____________ sediments can be carried at peak flow. Each system should have at least one file system which is bootable.Select one:a. Falseb. True 4 genetically unique haploid gametes (chiasmata) the first step in the genomic assessment of a patient is obtaining information regarding: Which reagents will react with the free amino terminus of a peptide?Select one or more:a. dicyclohexylcarbodiimide (DCC)b. 2,4-dinitrofluorobenzene (DNFB)c. cyanogen bromide (CNBr)d. 5-dimethylamino-1-naphthalenesulfonyl chloride (dansyl chloride)e. fluorenylmethylcarbonyl chloride (Fmoc) A balloon is rising vertically up according to the position equation h(t)=0.2t^2, where h is measured in meters and t in seconds. A camera on the ground is filming the balloons ascend 300 meters from the balloons launch site. If x in the angle of elevation of the camera, find the rate of x, in rad/s, at 1 minute after the launch.