Problem Statement
Each element of text is a line of prose from some passage. You will return a String[] that is read downward as opposed to left-to-right. That is, the first element of text will correspond to the first "column" of the returned String[], and so forth.
Definition
- Class:
- ProseFlip
- Method:
- getFlip
- Parameters:
- String[]
- Returns:
- String[]
- Method signature:
- String[] getFlip(String[] text)
- (be sure your method is public)
Constraints
- text will contain between 1 and 50 elements, inclusive.
- Each element of text will contain between 1 and 50 characters, inclusive.
- Each element of text will contain the same number of characters.
- Each character in text will be an uppercase letter ('A'-'Z').
Examples
{ "AAA", "BBB", "CCC" }Returns: {"ABC", "ABC", "ABC" }Rows of the input become columns of the return value.{"AAAAAAAAAAAAA"}Returns: {"A", "A", "A", "A", "A", "A", "A", "A", "A", "A", "A", "A", "A" }One long row.{ "A", "A", "A", "A", "A" }Returns: {"AAAAA" }One long column.