Answered step by step
Verified Expert Solution
Question
1 Approved Answer
1 . a method named fillArrayWithPrimes that takes as input parameter a file named ( String ) . the method will then open a file
a method named fillArrayWithPrimes that takes as input parameter a file named String the method will then open a file and try to read a positive integer N for the size of the array and a positive double value p for the starting prime value A warning message will be displayed if the file does not contain these values. The method will return an array size of N filled with primes starting from the value P input parameters: the file name String output parameters: a d array of size containint primes of p a method named readtablefromfile to initialize a d square table with content form a given file name string they table size n int and two values for min and max double Then fill the table with N double values from the file. if there are less than N values form the file print out a warning message and the rest of the table should be filled with random double values from the minmax range. input: the file nameString the table size N int min double and max double Output: a D table of size N x N as specified above a method named findmaxrows to find the maximum value of each row in the table a method named isXTable to chekc if the table is a x table ie the values in each of the two diaganols top left bottom right and top right bottom left of the table are sorted a method named sortTable to sort the table using bubble sort the main function to prompt the user for the name of the input file produce the following output making calls to methods # the main function will define two double constnts MINRANGE and MAXRANGE and then will read the first positive integer N from the file to be the size of the table. if there isnt any such positive integer N main will print out a warning and exit the program
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