Day 9
Objectives:
Objectives:
- File input/output, work with JFileChooser
Lab assignment:
Lab assignment:
- Practice Exercises for Day 9
- use the Employee with GUI project: EmployeeFileFrame.java, EmployeeFileFrameTest.java, HourlyEmployee.java
at this moment, the program saves the information into a fixed named file: hourly_employees.txt
We want to have an opportunity to save the employee's information into a different file. Just imagine that you have only one interface to enter the information about new employees, but you have several companies. Obviously each company should have its own list of employees, so each company should have a separate file.
Class materials:
Class materials:
lecture slides: Slides for Day 9
- JFileChooser (code from the book): JFileChooserDemo.java, JFileChooserTest.java
- File work demonstration: FileDemonstration.java, FileDemonstrationTest.java
- To Create an employee record(s): CreateEmployeeFile.java, CreateEmployeeFileTest.java, HourlyEmployee.java,
- To Read employee record(s): ReadEmployeeFile.java, ReadEmployeeFileTest.java
- Path interface (methods)
- Files interface (methods)