I need to loop through a 2 dimensional array with 3 rows of 6 Seller objects. (S
ID: 3628923 • Letter: I
Question
I need to loop through a 2 dimensional array with 3 rows of 6 Seller objects. (Seller array[2][5];) While looping through I need to call the print() function for each one. I'm not sure how to do this loop. Any input would be appreciated. Here's some context.print() const
This method takes no parameters and returns nothing. The method should be const, since it does not alter the database.
This method should first print a descriptive header line (e.g., "Sales Database Listing"). It should then loop through the rows of the two-dimensional array of Seller objects.
For each row, print a descriptive header with the region name (you may want to create a local array of region names to make this easier), and then loop through the columns of the row and call each Seller object's print() method.
Explanation / Answer
for( int =0; i<3; i++)
for(int j=0; j<6; j++)
print();