Question: Console Sample 1 (File exists) Employees Viewer program 2.0 COMMAND MENU 1. View employees in a department 2. View all managers 3. View all vice






Console Sample 1 (File exists) Employees Viewer program 2.0 COMMAND MENU 1. View employees in a department 2. View all managers 3. View all vice presidents 4. Exit program Command: 0 Invalid command! COMMAND MENU 1. View employees in a department 2. View all managers 3. View all vice presidents 4. Exit program Command: 1 Enter the department you want to view: sales Invalid department entered! Command: 1 Enter the department you want to view: Sales Josephine Darakjy Manager of Sales Department supervised by Vice President Meaghan Garufi Staff Members Mitsue Tollner Mattie Poquette Ernie StensethCommand: 2 Donette Foller Manager of Accounting Department supervised by Vice President Meaghan Garufi Kris Marrier Manager of Marketing Department supervised by Vice President Meaghan Garufi Abel Maclead Manager of Information Technology Department supervised by Vice President Gladys Rim Josephine Darakjy Manager of Sales Department supervised by Vice President Meaghan Garufi Kiley Caldarera Manager of Operations Department supervised by Vice President Willow Kusko Bette Nicka Manager of Production Department supervised by Vice President Gladys RimAlisha Slusarski Manager of Research and Development Department supervised by Vice President Gladys Rim Albina Glick Manager of Maintenance Department supervised by Vice President Willow Kusko Rozella Ostrosky Manager of Customer Service Department supervised by Vice President Willow Kusko Dyan Oldroyd Manager of Tech Support Department supervised by Vice President Willow Kusko Command: 3 Meaghan Garufi Vice President supervising Departments of Accounting Marketing Sales Gladys Rim Vice President supervising Departments of Information Technology Production Research and Development Willow Kusko Vice President supervising Departments of Operations Maintenance Customer Service Tech Support Command: 4 Bye!Console Sample 2 (File cannot be found) Employees Viewer COMMAND MENU 1. View employees in a department 2. View all managers 3. View all vice presidents 4. Exit program Could not find file: employees. txt Exiting program. . .The employees.txt file (columns aligned with tabs) . For staff members, the columns are name, title and supervisor respectively. For managers, the columns are name, title, supervisor and department respectively. For vice presidents, the columns are name, title and departments (tabs delimited) respectively. James Butler staff Kiley Caldarera Lenna Paprocki staff Donette Foller Donette Foller Manager Meaghan Garufi Accounting Leota Dilliard Staff Abel Maclead Kris Marrier Manager Meaghan Garufi Marketing Abel Maclead Manager Gladys Rim Information Technology Josephine Darakjy Manager Meaghan Garufi Sales Simona Morasca Staff Abel Maclead Sage Wieser staff Donette Foller Kiley Caldarera Manager Willow Kusko Operations Art Venere Staff Kris Marrier Mitsue Tollner staff Josephine Darakjy Minna Amigon Staff Abel Maclead Graciela Ruta staff Donette Foller Cammy Albares Staff Kiley Caldarera Mattie Poquette staff Josephine Darakjy Meaghan Garufi Vice President Accounting Marketing Sales Gladys Rim Vice President Information Technology Production Research and Development Bette Nicka Manager Gladys Rim Production Veronika Inouye Staff Bette Nicka Willard Kolmetz Staff Bette Nicka Maryann Royster Staff Bette Nicka Alisha Slusarski Manager Gladys Rim Research and Development Allene Iturbide Staff Alisha Slugarski Chanel Caudy Staff Alisha Slusarski Ezekiel Chui staff Alisha Slugarski Willow Kusko Vice President Operations Maintenance Customer Service Tech Support Bernardo Figeroa Staff Kiley Caldarera Ammie Corrio staff Kris Marrier Francine Vocelka Staff Kris Marrier Ernie Stenseth Staff Josephine Darakjy Albina Glick Manager Willow Kusko MaintenanceSpecifications "employees.txt" is a tab-delimited text file that contains information of all the employees in a company. Each employee must hold one of the 3 titles: staff member, manager and vice president. In the file, a staff member has their own name (spaces allowed), their own title (string "Staff", case sensitive) and the name of their supervisor (a manager); a manager has their own name (spaces allowed), their own title (string "Manager", case sensitive), the name of their supervisor (a vice president) and the department this manager supervises; a vice president has their own name (spaces allowed), their title (string "Vice President", case sensitive) and the departments (tabs delimited) this vice president supervises. This company consists of 10 different departments with their names as follows: Accounting. Customer Service, Information Technology, Maintenance, Marketing, Operations, Production, Research and Development, Sales, and Tech Support. A valid department name must be one of them with each word's first letter in capital and other letters in lowercase. Create an enumeration Department with 1 1 enumerators: Accounting, CustomerService, IT, Maintenance, Marketing, Operations, Production, RandD, Sales, TechSupport and Others; create an enumeration Command with 5 enumerators: ViewDept, ViewAllManagers, ViewAllVPs, Exit, and InvalidCommand. The values start at / in all the enumerations. Create an abstract class named Employee, 2 child classes Staff and VicePresident which inherit Employee publicly, and a grandchild class Manager which inherits Staff publicly. The details of all the classes and their relationships can be found in the Class Diagram below. Stafferget_description() returns a string obtained by concatenationg a leading new line character, the staff member's name and an ending new line character as shown in Console Sample I when user types I as the command. Manager: get_description() returns a string obtained by concatenationg a string returned by Staferget_description(), a string "Manager of", name of the department this manager supervises, a string " Department'n", a string "supervised by Vice President ", name of the vice president who supervises this manager, and an ending new line character as shown in Console Sample I when user types 2 as the command. Vice President: get_description() returns a string obtained by concatenationg a leading new line character, the vice president's name, a second new line character, a string "Vice President supervising Departments of n", and a string of the names of the departments this vice president supervises with new line characters as separators as shown in Console Sample I when user types 3 as the command
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
