Created code for database connection and closing at insertPosition and insertNewDept methods in Insert class
Created code for database connection and closing in showDepartments method in ViewEmployeeData class
Renamed method getDepartmentId() into getDeptId() in PositionData class
Created code for database connection and closing in newWordData method of EmployeeValidation class. Also created a printStackTrace() for SQLException.
Stored new-position user-input in PositionData object. Inserted this new data into database using the Insert Class insted of the old companyDatabase class.
Removed unused code from ViewEmployeeData class. The code removed was for opening the database before a method was called and then closing the database after. The reason for removing is that the code for opening and closing the database is already inside the called method, making the code redundant.
Saved new-department user-input in a String. Insert Class is used to add new Department into the database instead of Database class.