1. Display all departments.
2. Display all employees.
3. Display all projects.
4. Display information for employees who works on projects.
5. Add a new department.
6. Add a new employee.
7. Add a new project.
8. Add a new works on record.
9. Save all data into files.
0. Exit.
Input a choice (0-9): 1
Department number: 1, Department name: SALES, Manager number:
110, Budget: 1234.0, Manager start date: 02/01/2012
Department number: 2, Department name: ACCOUNTING, Manager
number: 120, Budget: 5566789.5, Manager start date:
30/10/2010
Department number: 3, Department name: GAMES, Manager number:
150, Budget: 100000.0, Manager start date: 01/03/2008
Department number: 4, Department name: HUMAN RESOURCES,
Manager number: 200, Budget: 500000.0, Manager start date:
02/01/2013
Department number: 5, Department name: SPORTS, Manager
number: 250, Budget: 8500000.0, Manager start date:
10/05/2010
Department number: 6, Department name: RESEARCH, Manager
number: 300, Budget: 45500.0, Manager start date:
10/06/2020
Department number: 7, Department name: EDUCATION, Manager
number: 350, Budget: 100000.0, Manager start date:
10/07/2019
Department number: 8, Department name: FINANCE, Manager
number: 500, Budget: 8400000.0, Manager start date:
10/08/2022
Department number: 9, Department name: COMPUTING, Manager
number: 600, Budget: 90000.0, Manager start date:
10/09/2018
1. Display all departments.
2. Display all employees.
3. Display all projects.
4. Display information for employees who works on projects.
5. Add a new department.
6. Add a new employee.
7. Add a new project.
8. Add a new works on record.
9. Save all data into files.
0. Exit.
Input a choice (0-9): 2
Admin Employee number: 600, Employee name: Willy, Date of
birth: 01/01/1988, Address: 41 Station Street Wollongong
NSW 2500, Gender: M, Salary: 250.5, Supervisor number: 0,
Department number: 9, Skills: Cook Read
Developer Employee number: 700, Employee name: Zhi, Date of
birth: 12/09/1999, Address: 112 Smith Street Windang NSW
2525, Gender: M, Salary: 80.2, Supervisor number: 600,
Department number: 9, Languages: C++ Java Python
Developer Employee number: 800, Employee name: Mary, Date of
birth: 03/10/2000, Address: 26 Gibsons Road Figtree NSW
2525, Gender: F, Salary: 50.0, Supervisor number: 700,
Department number: 9, Languages: Java Python SQL
Admin Employee number: 500, Employee name: Angelina, Date of
birth: 20/11/1990, Address: 25 Bong Bong Road Horsley NSW
2530, Gender: F, Salary: 250.0, Supervisor number: 0,
Department number: 8, Skills: Read Write
Developer Employee number: 510, Employee name: Anna, Date of
birth: 20/11/1990, Address: 200 Cemetary Road Hawea NSW
2800, Gender: F, Salary: 100.0, Supervisor number: 500,
Department number: 8, Languages: Python SQL
Admin Employee number: 520, Employee name: Madelaine, Date of
birth: 20/11/1990, Address: 23 Lake View Street Figtree
NSW 2525, Gender: F, Salary: 50.0, Supervisor number: 510,
Department number: 8, Skills: Write Communication
Admin Employee number: 530, Employee name: Robert, Date of
birth: 20/11/1990, Address: 80 Penny Road Windang NSW 2520,
Gender: M, Salary: 50.0, Supervisor number: 510,
Department number: 8, Skills: Management Travel
Developer Employee number: 540, Employee name: Claudio, Date
of birth: 20/11/1990, Address: 23 Horsley Street Unanderra
NSW 2528, Gender: M, Salary: 50.0, Supervisor number: 510,
Department number: 8, Languages: Java C Python SQL
Developer Employee number: 350, Employee name: Brian, Date of
birth: 13/05/1965, Address: 23 Station Street Wollongong
NSW 2500, Gender: M, Salary: 200.4, Supervisor number: 0,
Department number: 7, Languages: Shell Java Python
Developer Employee number: 110, Employee name: Alvin, Date of
birth: 13/10/1977, Address: 56 Marlo Road Wollongong NSW
2500, Gender: M, Salary: 156.4, Supervisor number: 100,
Department number: 1, Languages: SQL Shell HTML
1. Display all departments.
2. Display all employees.
3. Display all projects.
4. Display information for employees who works on projects.
5. Add a new department.
6. Add a new employee.
7. Add a new project.
8. Add a new works on record.
9. Save all data into files.
0. Exit.
Input a choice (0-9): 3
Project number: 1001, Project title: Computation, Sponsor:
Microsoft, Department number: 8, Project budget: 25000.0
Project number: 1002, Project title: Study methods, Sponsor:
Education committee, Department number: 3, Project budget:
15000.0
Project number: 1003, Project title: Racing car, Sponsor:
Cloud Pty Ltd, Department number: 3, Project budget:
225000.0
Project number: 1004, Project title: Football, Sponsor:
Football Club, Department number: 5, Project budget:
35000.0
Project number: 1005, Project title: Swimming, Sponsor:
Education Committee, Department number: 5, Project budget:
125000.0
Project number: 1006, Project title: Database, Sponsor:
Database Committee, Department number: 5, Project budget:
125000.0
1. Display all departments.
2. Display all employees.
3. Display all projects.
4. Display information for employees who works on projects.
5. Add a new department.
6. Add a new employee.
7. Add a new project.
8. Add a new works on record.
9. Save all data into files.
0. Exit.
Input a choice (0-9): 4
Project number: 1001, Project title: Computation, Sponsor:
Microsoft, Department number: 8, Project budget: 25000.0
Developer Employee number: 800, Employee name: Mary, Date of
birth: 03/10/2000, Address: 26 Gibsons Road Figtree NSW
2525, Gender: F, Salary: 50.0, Supervisor number: 700,
Department number: 9, Languages: Java Python SQL
Hours: 10
Project number: 1001, Project title: Computation, Sponsor:
Microsoft, Department number: 8, Project budget: 25000.0
Developer Employee number: 510, Employee name: Anna, Date of
birth: 20/11/1990, Address: 200 Cemetary Road Hawea NSW
2800, Gender: F, Salary: 100.0, Supervisor number: 500,
Department number: 8, Languages: Python SQL
Hours: 15
Project number: 1002, Project title: Study methods, Sponsor:
Education committee, Department number: 3, Project budget:
15000.0
Developer Employee number: 700, Employee name: Zhi, Date of
birth: 12/09/1999, Address: 112 Smith Street Windang NSW
2525, Gender: M, Salary: 80.2, Supervisor number: 600,
Department number: 9, Languages: C++ Java Python
Hours: 20
Project number: 1003, Project title: Racing car, Sponsor:
Cloud Pty Ltd, Department number: 3, Project budget:
225000.0
Developer Employee number: 800, Employee name: Mary, Date of
birth: 03/10/2000, Address: 26 Gibsons Road Figtree NSW
2525, Gender: F, Salary: 50.0, Supervisor number: 700,
Department number: 9, Languages: Java Python SQL
Hours: 15
Project number: 1003, Project title: Racing car, Sponsor:
Cloud Pty Ltd, Department number: 3, Project budget:
225000.0
Developer Employee number: 540, Employee name: Claudio, Date
of birth: 20/11/1990, Address: 23 Horsley Street Unanderra
NSW 2528, Gender: M, Salary: 50.0, Supervisor number: 510,
Department number: 8, Languages: Java C Python SQL
Hours: 10
Project number: 1004, Project title: Football, Sponsor:
Football Club, Department number: 5, Project budget:
35000.0
Developer Employee number: 350, Employee name: Brian, Date of
birth: 13/05/1965, Address: 23 Station Street Wollongong
NSW 2500, Gender: M, Salary: 200.4, Supervisor number: 0,
Department number: 7, Languages: Shell Java Python
Hours: 10
Project number: 1005, Project title: Swimming, Sponsor:
Education Committee, Department number: 5, Project budget:
125000.0
Developer Employee number: 350, Employee name: Brian, Date of
birth: 13/05/1965, Address: 23 Station Street Wollongong
NSW 2500, Gender: M, Salary: 200.4, Supervisor number: 0,
Department number: 7, Languages: Shell Java Python
Hours: 10
1. Display all departments.
2. Display all employees.
3. Display all projects.
4. Display information for employees who works on projects.
5. Add a new department.
6. Add a new employee.
7. Add a new project.
8. Add a new works on record.
9. Save all data into files.
0. Exit.
Input a choice (0-9): 5
Department number: 3
The department 3 exists.
1. Display all departments.
2. Display all employees.
3. Display all projects.
4. Display information for employees who works on projects.
5. Add a new department.
6. Add a new employee.
7. Add a new project.
8. Add a new works on record.
9. Save all data into files.
0. Exit.
Input a choice (0-9): 5
Department number: 10
Department name: Database system
Manager number: 520
Budget: 15000.5
Start date: 10/01/2020
1. Display all departments.
2. Display all employees.
3. Display all projects.
4. Display information for employees who works on projects.
5. Add a new department.
6. Add a new employee.
7. Add a new project.
8. Add a new works on record.
9. Save all data into files.
0. Exit.
Input a choice (0-9): 6
Employee number: 110
The employee 110 exists.
1. Display all departments.
2. Display all employees.
3. Display all projects.
4. Display information for employees who works on projects.
5. Add a new department.
6. Add a new employee.
7. Add a new project.
8. Add a new works on record.
9. Save all data into files.
0. Exit.
Input a choice (0-9): 6
Employee number: 120
Employee name: Alice Smith
Data of birth (dd/mm/yyyy): 10/02/2000
Address: 1 Northfields ave Wollongong NSW 2500
Gender: F
Salary: 520.3
Supervisor number: 110
Department number: 3
Admin or Developer (A or D)?: D
Languages: C++ Java SQL Lisp
1. Display all departments.
2. Display all employees.
3. Display all projects.
4. Display information for employees who works on projects.
5. Add a new department.
6. Add a new employee.
7. Add a new project.
8. Add a new works on record.
9. Save all data into files.
0. Exit.
Input a choice (0-9): 7
Project number: 1003
The project 1003 exists.
1. Display all departments.
2. Display all employees.
3. Display all projects.
4. Display information for employees who works on projects.
5. Add a new department.
6. Add a new employee.
7. Add a new project.
8. Add a new works on record.
9. Save all data into files.
0. Exit.
Input a choice (0-9): 7
Project number: 1008
Project title: Database Management
Sponsor: Oracle Pty Ltd
Department number: 9
Budget: 100000.0
1. Display all departments.
2. Display all employees.
3. Display all projects.
4. Display information for employees who works on projects.
5. Add a new department.
6. Add a new employee.
7. Add a new project.
8. Add a new works on record.
9. Save all data into files.
0. Exit.
Input a choice (0-9): 8
Employee number: 100
The employee 100 does not exist.
1. Display all departments.
2. Display all employees.
3. Display all projects.
4. Display information for employees who works on projects.
5. Add a new department.
6. Add a new employee.
7. Add a new project.
8. Add a new works on record.
9. Save all data into files.
0. Exit.
Input a choice (0-9): 8
Employee number: 120
Project number: 1004
Input total hours: 20
1. Display all departments.
2. Display all employees.
3. Display all projects.
4. Display information for employees who works on projects.
5. Add a new department.
6. Add a new employee.
7. Add a new project.
8. Add a new works on record.
9. Save all data into files.
0. Exit.
Input a choice (0-9): 8
Employee number: 540
Project number: 1003
The employee 540 has already been allocated to the project
1003
1. Display all departments.
2. Display all employees.
3. Display all projects.
4. Display information for employees who works on projects.
5. Add a new department.
6. Add a new employee.
7. Add a new project.
8. Add a new works on record.
9. Save all data into files.
0. Exit.
Input a choice (0-9): 9
Data saved.
1. Display all departments.
2. Display all employees.
3. Display all projects.
4. Display information for employees who works on projects.
5. Add a new department.
6. Add a new employee.
7. Add a new project.
8. Add a new works on record.
9. Save all data into files.
0. Exit.
Input a choice (0-9): 0
Bye-bye
The contents of updated files are listed below. New data are
highlighted.
departments.txt:
1, SALES, 110, 1234.00, 02/01/2012
2, ACCOUNTING, 120, 5566789.50, 30/10/2010
3, GAMES, 150, 100000.00, 01/03/2008
4, HUMAN RESOURCES, 200, 500000.00, 02/01/2013
5, SPORTS, 250, 8500000.00, 10/05/2010
6, RESEARCH, 300, 45500.00, 10/06/2020
7, EDUCATION, 350, 100000.00, 10/07/2019
8, FINANCE, 500, 8400000.00, 10/08/2022
9, COMPUTING, 600, 90000.00, 10/09/2018
10, Database system, 520, 15000.50, 10/01/2020
employees.txt:
A, 600, Willy, 01/01/1988, 41 Station Street Wollongong NSW 2500,
M, 250.50, 0, 9, Cook Read
D, 700, Zhi, 12/09/1999, 112 Smith Street Windang NSW 2525, M,
80.20, 600, 9, C++ Java Python
D, 800, Mary, 03/10/2000, 26 Gibsons Road Figtree NSW 2525, F,
50.00, 700, 9, Java Python SQL
A, 500, Angelina, 20/11/1990, 25 Bong Bong Road Horsley NSW 2530,
F, 250.00, 0, 8, Read Write
D, 510, Anna, 20/11/1990, 200 Cemetary Road Hawea NSW 2800, F,
100.00, 500, 8, Python SQL
A, 520, Madelaine, 20/11/1990, 23 Lake View Street Figtree NSW
2525, F, 50.00, 510, 8, Write Communication
A, 530, Robert, 20/11/1990, 80 Penny Road Windang NSW 2520, M,
50.00, 510, 8, Management Travel
D, 540, Claudio, 20/11/1990, 23 Horsley Street Unanderra NSW 2528,
M, 50.00, 510, 8, Java C Python SQL
D, 350, Brian, 13/05/1965, 23 Station Street Wollongong NSW 2500,
M, 200.40, 0, 7, Shell Java Python
D, 110, Alvin, 13/10/1977, 56 Marlo Road Wollongong NSW 2500, M,
156.40, 100, 1, SQL Shell HTML
D, 120, Alice Smith, 10/02/2000, 1 Northfields ave Wollongong NSW
2500, F, 520.30, 110, 3, C++ Java SQL Lisp
projects.txt:
1001, Computation, Microsoft, 8, 25000.00
1002, Study methods, Education committee, 3, 15000.00
1003, Racing car, Cloud Pty Ltd, 3, 225000.00
1004, Football, Football Club, 5, 35000.00
1005, Swimming, Education Committee, 5, 125000.00
1006, Database, Database Committee, 5, 125000.00
1008, Database Management, Oracle Pty Ltd, 9, 100000.00
workson.txt:
1001, Computation, Microsoft, 8, 25000.00
800, Mary, 03/10/2000, 26 Gibsons Road Figtree NSW 2525, F, 50.00, 700, 9, Java Python SQL
10
1001, Computation, Microsoft, 8, 25000.00
510, Anna, 20/11/1990, 200 Cemetary Road Hawea NSW 2800, F, 100.00, 500, 8, Python SQL
15
1002, Study methods, Education committee, 3, 15000.00
700, Zhi, 12/09/1999, 112 Smith Street Windang NSW 2525, M, 80.20, 600, 9, C++ Java Python
20
1003, Racing car, Cloud Pty Ltd, 3, 225000.00
800, Mary, 03/10/2000, 26 Gibsons Road Figtree NSW 2525, F, 50.00, 700, 9, Java Python SQL
15
1003, Racing car, Cloud Pty Ltd, 3, 225000.00
540, Claudio, 20/11/1990, 23 Horsley Street Unanderra NSW 2528, M, 50.00, 510, 8, Java C
Python SQL
10
1004, Football, Football Club, 5, 35000.00
350, Brian, 13/05/1965, 23 Station Street Wollongong NSW 2500, M, 200.40, 0, 7, Shell Java
Python
10
1005, Swimming, Education Committee, 5, 125000.00
350, Brian, 13/05/1965, 23 Station Street Wollongong NSW 2500, M, 200.40, 0, 7, Shell Java
Python
10
1004, Football, Football Club, 5, 35000.00
120, Alice Smith, 10/02/2000, 1 Northfields ave Wollongong NSW 2500, F, 520.30, 110, 3, C++
Java SQL Lisp
20
1006, Database, Database Committee, 5, 125000.00
540, Claudio, 20/11/1990, 23 Horsley Street Unanderra NSW 2528, M, 50.00, 510, 8, Java C
Python SQL
15