Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

When an object of your class is declared, it should automatically read number s from a data file named Numbers.txt (the format of this file

When an object of your class is declared, it should automatically read number

s from a data file named Numbers.txt

(the format of this file is up to you, but think about this logically (maybe have one row in

the file for each row with perhaps comma separated values))

and use them to fill a 9x9 2

-

dimensional

array. Assume the numbe

rs will be in the range 09. For example, the array may look like:One of the

methods a user should be able to call in your class will return list of numbers NOT in a

row/column combination. For example, if the user passes to your method a row number of 3 and a

column nu

mber of 5, the list of numbers 0

-

9 that are not in the list is

3 and 7. If the user passes a row

number of 5 and a column number of 3, the list returned will be 2, 5, 6, and 9. Note: Have your method

pass back an array with missing the numbers IN ASCENDING ORDER, and return an integer specifying the

number of numbers

in the array. In the first example the method will return 2, and pass back an array

holding 3 and 7 (in that order in the first two slots). In the second example the method would return 4,

and pass back an array holding 2, 5, 6, and 9 (in that order in the

first 4 slots).

Another method available to the user will be a Display method that will display the two dimensional

array on the screen.

Also include a method that will allow the user to Replace a number in the array, at a given location

(row/column), w

ith another number 0

-

9.

Basically, the user code will have a menu with the following options:

1

Display the array

2

Replace a number in the array

// the user will supply the row, column, and the new number to place there

3

What are the missing num

bers

// the user will supply the row and the column

// the main() code will display on the screen the missing numbers returned by the method

0

-

Quit

NOTE: Rows and Columns as entered by the user start at 1, not zero.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered 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

Students also viewed these Databases questions