CSCI 261 - Programming Concepts - Spring 2022

Lab 6A - Multidimensional Data

This lab is due by Thursday, April 21, 2022, 11:59 PM.
As with all labs you may, and are encouraged, to pair program a solution to this lab. If you choose to pair program a solution, be sure that you individually understand how to generate the correct solution.


Instructions


In this lab we will begin creating two-dimensional lists of data. We will read in a square table of integers and report back the values in the table.

To get started, prompt the user to enter the name of a file. These files will be formatted as follows:

n
a b c d e...
f g h i j...
...

The first integer n, states the number of rows to follow. Each row is made up of n integers.

You will need to read these integers into a table comprised of a two-dimensional array or a two-dimensional LinkedList. After all the values have been read and stored in the table, print out the (1) table (2) the minimum value (3) the maximum value.

To test your implementations, two sample input files have been given: table1.dat and table2.dat.

The expected output for the first file is below:

What file do you wish to open: table1.dat
The table is:
1 2 3 4 5
6 7 8 9 10
11 12 13 14 15
16 17 18 19 20
21 22 23 24 25
The min is: 1
The max is: 25

The expected output for the first file is below:

What file do you wish to open: table2.dat
The table is:
5 3 1 7
2 4 6 18
13 0 11 -3
12 9 10 14
The min is: -3
The max is: 18

Lab Submission


Submit your main.cpp, Makefile, *.hpp, *.h, *.cpp file(s).

You will submit your solution to this lab with the rest of Set6. Detailed instructions for doing this are posted in Assignment 6.


This lab is due by Thursday, April 21, 2022, 11:59 PM.
As with all labs you may, and are encouraged, to pair program a solution to this lab. If you choose to pair program a solution, be sure that you individually understand how to generate the correct solution.