Question: 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

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.
Main.java: public class Main {
public static void main(String[] args){
// Prints "Hello, World" to the terminal window.
System.out.println("Hello, World");
}
}
shape.txt:
type,height,width
rectangle,924,80
rectangle,687,93
rectangle,472,77
rectangle,551,52
rectangle,72,60
rectangle,88,80

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!