Answered step by step
Verified Expert Solution
Question
1 Approved Answer
JAVA PROGRAMMING - Comments would be appreciated Write a program with four methods The main method does the following: a. Requests from the user the
JAVA PROGRAMMING - Comments would be appreciated
Write a program with four methods The main method does the following: a. Requests from the user the dimensions of a two dimensional array. Im. Calls a method booleanFull that randomly fills the two-dimensional array with either true or falsc c. d. e. f. Calls a second method called calcPercent that returns the percentage of cells that are true. Then prints out the following sentence with the percentage correct rounded to two decimal The percent ofelements that are true in the array is percentThe%. Prints out the boolean array row by row. places: The method createArray does the following: a. Accepts the dimensions of the array as formal parameters. b. Creates a boolean two-dimensional array with those dimensions c. Returns a reference to the two-dimensional boolean array. The method booleanFull does the following: a. Accepts a reference to a two dimensional boolean array. b. Fills each cell with a randomly generated true or false value starting from a seed equal to 2. The method calcPercent does the following: a. Accepts a reference to a two-dimensional boolean array. b. Calculates the percentage of the elements with the value true as type double. c. Returns the percentage as a type double
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started