Programming Final 100 points. In this final, you will be manipulating a grid. You may assume the user will enter correct input (unless noted). Read data that makes up a grid from a file The file must be named test.txt First two numbers in the file are the sizes of grid. The first number is the X size (so how many spots across), the second value is the Y size (how many spots down). After the sizes, the rest of the file is filled with data to fill in the grid. Example file: 3 4X Y YA B CD E FH F A Print out the contents in a grid. For the example file, the output should be X Y YA B CD E FH F A NOTE: Your array might be transposed once you print out the data. If you cannot figure it out quickly why that is, continue on and come back. A transposed print is worth a lot less than the rest of the exam. Repeatedly loop over a menu. Options in the menu: Update all the values in a row with a particular value The user enters in the row number and a value and all entries in that row are set to the value. Query a value if given the indexes. Here the user inputs an X and Y and you print out the value present at the spot. You must account for if the user does not enter a valid X or valid Y – send the user back to the menu if it is invalid. Print the grid. Print out whether a particular value is in the grid Here the user enters in a VALUE and you tell them if it exists in the grid. If anything else is entered then the program exits. Example run (using the previous example input file. NOTE: the test file can be different.) X Y Y A B C D E F H F A 1. Set all the values in a row an entered value2. Get the value at an index3. Print the grid4. Determine if in gridAny other input exits.Please enter an option: >> 1Which row?>> 1What value?>> 41. Set all the values in a row an entered value2. Get the value at an index3. Print the grid4. Determine if in gridAny other input exits.Please enter an option: >> 3X Y Y 4 4 4 D E F H F A 1. Set all the values in a row an entered value2. Get the value at an index3. Print the grid4. Determine if in gridAny other input exits.Please enter an option: >> 2Please enter in an x and y>> 0 1Value is: 41. Set all the values in a row an entered value2. Get the value at an index3. Print the grid4. Determine if in gridAny other input exits.Please enter an option: >> 4What value do you wish to check?>> AA exists1. Set all the values in a row an entered value2. Get the value at an index3. Print the grid4. Determine if in gridAny other input exits.Please enter an option: >> quit
Blog
According to the following reaction, what amount of Al2S3 re…
According to the following reaction, what amount of Al2S3 remains when 20.00 g of Al2S3 and 2.00 g of H2O are reacted? Molar Masses: Al2S3 = 150.17 g/mol, H2O = 18.02 g/mol.
Which response includes only species that have the electroni…
Which response includes only species that have the electronic configuration 1s2 2s2 2p6 3s2 3p6, and no other species?
Which of the following valence-shell configurations is/are p…
Which of the following valence-shell configurations is/are possible for a neutral atom for an element?
How many electrons are in the ion, Cu2+?
How many electrons are in the ion, Cu2+?
For the gases plotted in the figure, it can be concluded tha…
For the gases plotted in the figure, it can be concluded that
Calculate the amount of heat (in kJ) required to raise the t…
Calculate the amount of heat (in kJ) required to raise the temperature of a 86.0 g sample of ethanol from 198.0 K to 300.0 K. The specific heat capacity of ethanol is 2.42 J/g°C.
A comparison of the electron configurations of cobalt (Co) a…
A comparison of the electron configurations of cobalt (Co) and chromium (Cr) indicates that
Consider the following specific heats: copper, 0.384 J/g·oC;…
Consider the following specific heats: copper, 0.384 J/g·oC; lead, 0.159 J/g·oC; water, 4.18 J/g·oC; glass, 0.502 J/g·oC. Which substance, once warmed, would be more likely to maintain its heat and keep you warm through a long football game on a cold night?
In the Common Classes hierarchy a(n) ________________ is an…
In the Common Classes hierarchy a(n) ________________ is an Actor that can be possessed by a Controllerin the game.