Assignment: #Flatten Due: 02/17/02019 Points: 3

Specification

Copy the program Flatten.java and implement the TBI (To Be Implemented) methods flatten(int[][]) and flatten(String[][]).

You will need to study the code in the print(int[]) and print(String[][]) methods to figure out how the flatten() methods "flatten" their 2-dimensional array parameter into their 1-dimensional array return value.

Your program cannot contain any import statements.

The output of your program must match the following. {output file}

{ }
{ 1, }
{ 1, 2, }
{ 1, 2, 3, }
{ 1, 2, 3, 4, }
{ 1, 2, 3, 4, 5, }
{ 1, 2, 3, 4, 5, 6, }
{ "if", "else", "switch", }
{ "while", "do while", "for", }
{ "break", "continue", }
{ "*", "/", "%", "+", "-", }
{ ">", ">=", "<=", "<", "==", "!=", }
{ "&&", "||", "!", }
{ "<<", ">>", ">>>", "&", "|", "^", "~", }