Starting from:

$30

BBM203-C-LinkedList Solved

1. Introduction


 

2. Problem Statement

With the object-oriented programming method, an "Employee Recording System" application will be developed for a public institution. Quick access to the following employee data is expected via the employee number and date of appointment to the institution.

•        Employee number: 4-digit integer

•        Employe type: temporary or permanent (Obtained from user 0 as temp. 1 as perm.)

•        Name: 12 characters

•        Surname: 12 characters

•        Title: 12 characters

•        Salary coefficient: real number

•        Date of birth: Date (separate integers for day, month, and year)

•        Date of appointment to the institution: Date (separate integers for day, month, and year)

•        Length of service in other institutions (days): integer (will not be asked if not necessary)

To access employee information via employee number, a circular single-linked list with a topof-list node will be used, in ascending order by employee number. A double-linked list with a top-of-the-list node will be used to access employee information via the date of appointment to the institution. There are two types of employee subclasses: TemporaryEmployee and PermanentEmployee. Because TemporaryEmployee is not many in numbers but frequently changing in the system, it will be an array implementation (Maximum number of temporary employees are 20). Similarly, since the majority of employees are PermanentEmployee, it will be implemented with dynamic memory allocation. The following table summarizes the structure.

 
TemporaryEmployee
PermanentEmployee
Linked List Type
Circular single linked list
Double linked list
Implementation Type
Array Implementation
Dynamic Memory Allocation
Inheritance
Employee's subclass
Employee's subclass
Order by
Employee number
Date of appointment
Unique access by
Employee number
Employee number
Accordingly, the requests listed below are expected to be fulfilled via a menu offered in the console application:  

1)      Appointment of an employee, who started working for the first time, to the institution


First, the employee number must be obtained from the user and if there is an employee with the same number, no addition should be made, otherwise the other information of the employee (starting from the employee type in the given order) must be obtained from the user and the insertion must be performed.

2)      Appointment of an employee, who transferred from another institution, to the institution 


First, the employee number must be obtained from the user and if there is an employee with this number, no addition should be made, otherwise the other information of the employee (starting from the employee type in the given order) must be obtained from the user and the insertion must be performed.

3)      Updating the title and salary coefficient of an employee


First, the employee number must be obtained from the user, and if there is an employee with this number, the title and salary coefficient must be updated.

4)      Deletion of an employee


First, the employee number must be obtained from the user, and if there is an employee with this number, the deletion process must be performed.

5)      Listing the information of an employee


First, the employee number must be obtained from the user, and if there is an employee with this number, the information must be listed.  

6)      Listing of all employees in the order of employee number 


All employees' information should be listed in the ascending order by employee number.

7)      Listing of all employees in the order of their appointment to the institution 


The information of all employees should be listed in order from oldest to newest according to the date of appointment to the institution.  

8)      Listing the employees assigned to the institution after a certain date 


First, the date should be taken from the user, and the information of the all employees assigned to the institution after this date should be listed in order from new to old according to the date of appointment to the institution.

9)      Listing the employees assigned to the institution in a given year 


First, the year must be taken from the user and the information of the all employees assigned to the institution in this year should be listed in order from oldest to newest according to the date of appointment to the institution.

10)  Listing of employees born before a certain date 


First, the date should be taken from the user and the information of all employees born before this date should be listed in ascending order according to the employee number.  

11)  Listing of employees born in a particular month 


First, the month should be taken from the user and the information of all employees born in this month should be listed in ascending order according to the employee number.  

12)  Listing the information of the employee with a certain title, who was last assigned to the institution


First, the title should be taken from the user, and the information of the employee with this title, who was last assigned to the institution, should be listed.

  

3. Requirements

1)  Assume that data entries will be made correctly, do not check for errors.

2)  Make sure that your algorithm is efficient in search operations.

3)  The project will be implemented, build and run in the dev environment.

4)  The project will be delivered to the submit system of our department.

5)  In terms of object-oriented programming principles, the project is expected to have the following characteristics:

a.  At least Employee, TemporaryEmployee, PermanentEmployee, Date, CircularArrayLinkedList and DoubleDynamicLinkedList classes must be defined. The purpose of list classes is to hold the top-of-the-list node for the linked list and to offer operations (add, delete, search/find, list/query, etc.) on the list. Having a single list class will result in loss of points.

b.  Data members of classes must be specified as private.

c.   Data members (except arrays) that are not expected to change must be specified as const.

d.  Classes should have the necessary read and set (get&set) functions.

e.  Constructor functions should use default arguments if appropriate.

f.    The << operator must be overloaded for the Employee, TemporaryEmployee, Pe r m a n e n t E m p l o ye e, D a t e, C i r c u l a r A r r a y L i n k e d L i s t a n d

DoubleDynamicLinkedList classes.

g.  Comparison operators (<, >, <=, >=, == etc.) required for the date class must be overloaded with the member function method.

h.  Interfaces (header files) and implementations (cpp files) of classes must be separate.  

i.    Interfaces and their parts must be clearly explained in the report.


6. Inputs and Outputs

The console application will look like the following when it is started. It will keep turning back to this menu after operationg the selected operations. The system will be on unless the user closes the application (your executable program)

 

Example of the second operation given below. The following console image inserting a new employee to the system with the whole necessary information. Notice the date terms are separated with "-" character and the length of service is necessary for only the transferred employees (will not be asked to the user for new employees, default 0)

More products