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 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 mainString args
Prints "Hello, World" to the terminal window.
System.out.printlnHello World";
shape.txt:
type,height,width
rectangle,
rectangle,
rectangle,
rectangle,
rectangle,
rectangle,
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
