Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a program that satisfies the following for 2D arrays: 1) Prompts users with this menu: a. Create: returns an uninitialized 2D array of the

image text in transcribed
Write a program that satisfies the following for 2D arrays: 1) Prompts users with this menu: a. Create: returns an uninitialized 2D array of the size nRows, nCols b. Fill Rand: populates the array with random ints within a range [min, max] C. Print: displays the array on the screen Set at: given row and col, overwrite the value at the given location e. Print at: given row and col, returns and displays the value at the given location t. Get Row: given a row#, returns and displays all elements in the row g. Get Col: given a col , returns and displays all elements in the col h. Set Row: given a row#, set the row with the given user row I. Set Col: given a col# set the col with the given user col J. Mean of Row: computes, returns and displays average of a given row . Mean of Col: computes, returns and displays average of a given col l. Sum of All: computes, returns and displays average of the array m. Mean of All: computes returns, and displays total of the array n. End: Quits the program 2) Every task in (I) must be implemented as a method 3) Write a while loop to keep prompting the user for next option 4) Write a switch structure that performs the selected task Write a program that satisfies the following for 2D arrays: 1) Prompts users with this menu: a. Create: returns an uninitialized 2D array of the size nRows, nCols b. Fill Rand: populates the array with random ints within a range [min, max] C. Print: displays the array on the screen Set at: given row and col, overwrite the value at the given location e. Print at: given row and col, returns and displays the value at the given location t. Get Row: given a row#, returns and displays all elements in the row g. Get Col: given a col , returns and displays all elements in the col h. Set Row: given a row#, set the row with the given user row I. Set Col: given a col# set the col with the given user col J. Mean of Row: computes, returns and displays average of a given row . Mean of Col: computes, returns and displays average of a given col l. Sum of All: computes, returns and displays average of the array m. Mean of All: computes returns, and displays total of the array n. End: Quits the program 2) Every task in (I) must be implemented as a method 3) Write a while loop to keep prompting the user for next option 4) Write a switch structure that performs the selected task

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Put Your Data To Work 52 Tips And Techniques For Effectively Managing Your Database

Authors: Wes Trochlil

1st Edition

0880343079, 978-0880343077

Students also viewed these Databases questions