Online (1)
Main.java x shapes.txt x
1 public class Main {
public static void main(String[] args) {
// Prints "Hello, World" to the terminal window.
System.out.println("Hello, World");
}
}
I
CONSOLE SHELL
Check Answer Reset to Template Recent Submissions
Run
Online (1)
Main.java x shapes.txt x
1 type, height, width
rectangle, 924,80
rectangle, 687,93
4 rectangle, 472,77
5 rectangle, 551,52
6 rectangle, 72,60
7 rectangle, 88,80
CONSOLE SHELL
Examine the given file. Create the class necessary to hold the
information contained in the lines of the file using an OO
approach. This class should have getters and setters for any
attributes, and 1 additional method.
Create objects of this type for each line in the file by reading lines
of the file sequentially. Add each of the objects to an arraylist.
Loop through that arraylist and call the method you created.