diff --git a/src/noteBook/NoteBook.java b/src/noteBook/NoteBook.java index 2f54d32..d5e7d4b 100644 --- a/src/noteBook/NoteBook.java +++ b/src/noteBook/NoteBook.java @@ -1,13 +1,52 @@ package noteBook; +import input.Gender; import input.Input; import input.Person; import input.Society; +import java.io.File; +import java.io.IOException; +import java.util.Scanner; public class NoteBook { public Input[] inputs; public Input[] selected; + public void fileReading(String fileName) throws IOException { + File file = new File(fileName); + Scanner fileScanner = new Scanner(file); + int lines = 0; + while(fileScanner.hasNextLine()){ + lines++; + } + inputs = new Input[lines]; + fileScanner.reset(); + for (int i = 0; i