Question: For each skyscraper read from the input file your program should first print that skyscraper, but with a space before the clues for the columns.
For each skyscraper read from the input file your program should first print that skyscraper, but with a space before the clues for the columns. There should NOT be spaces between any of the clues or skyscraper building heights.
After printing the skyscraper you should print either the word VALID if the clues for that skyscraper were met or the words NOT VALID otherwise. VALID or NOT VALID ALL CAPS REQUIRED should occur on the line immediately following the skyscraper and should be followed by a newlinecarriage return
Based on the second example input file above your output should look like this:
VALID
NOT VALID
COMPLETED PROCESSING SKYSCRAPERS
Note: the first and last line of each skyscraper have a space in front.
In the Skyscraper class, you will need to provide at least four public static methods as following:
Method Description
int getSkyscrapersScanner The public static method use the Scanner parameter passed in the method to read skyscrapers from standard input into D array. The array should be x and each corner should be set to
boolean validateSkyscrapersint The public static method validates the D array that read from standard input.
true if the grid is valid
boolean if the grid is not valid
void printSkyscrapersint grid, boolean validity The public static method validates the D array that read from standard input.
true if the grid is valid
boolean if the grid is not valid
void mainString args The public static main method will run the workflow of the program.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
