BBM203 Assignment 1-Linked List Solved

30.00 $

Category:

Description

Rate this product

Linked List

Programming Language: C++

1. Introduction
Check for BBM201 and BBM203 course sources for linked lists, classes and headers.
 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 top- of-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

BBM203-A2 1

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. 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. 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. 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. 4)  Deletionofanemployee
    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. 5)  Listingtheinformationofanemployee
    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. 6)  Listingofallemployeesintheorderofemployeenumber
    All employees’ information should be listed in the ascending order by employee number.

BBM203-A2 2

  1. 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.
  2. 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.
  3. 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.
  4. 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.
  5. 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.
  6. 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. 1)  Assume that data entries will be made correctly, do not check for errors.
  2. 2)  Make sure that your algorithm is efficient in search operations.
  3. 3)  The project will be implemented, build and run in the dev environment.
  4. 4)  The project will be delivered to the submit system of our department.
  5. 5)  In terms of object-oriented programming principles, the project is expected to have the following characteristics:
    1. 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.
    2. Data members of classes must be specified as private.

BBM203-A2 3

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

  1. Classes should have the necessary read and set (get&set) functions.
  2. Constructor functions should use default arguments if appropriate.
  3. The << operator must be overloaded for the Employee, TemporaryEmployee, PermanentEmployee, Date, CircularArrayLinkedList and DoubleDynamicLinkedList classes.
  4. Comparison operators (<, >, <=, >=, == etc.) required for the date class must be overloaded with the member function method.
  5. Interfaces (header files) and implementations (cpp files) of classes must be separate.
  6. 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)

BBM203-A2 4

7. Grading

Evaluation Metric Points Your guess/expectation of grading (evaluate your self in your report)

Efficiency of the program

5…

Compliance with OOP principles Correctly working parts
Report

25 …

45 …

25 …

Report Format (Required)
1) Cover: Your name, student number, course name, delivery date.

2) Introduction: Define the project in your own words. What is the problem description? Project goals?

BBM203-A2 5

  1. 3)  Method: What are your methods to solve the problem? Why?
  2. 4)  Development
    1. 1)  Plan: What is the project plan? Your requirements.
    2. 2)  Analysis:Whatkindofanalysishaveyoudone?Why?Statetheprobleminyourown words.
    3. 3)  Design: What is your solution overflow? Why? Which methods have you chosen? Why? What are their functions/properties? Why are they beneficial to our problem? Which other methods may be chosen? Why are they eliminated? How do you tune your solution? Write down your thoughts on the solution of the problem and write down the interfaces of the abstract data types (classes) required for the solution. Explain your design.
    4. 4)  Implementation: Flow of the implementation. Explain your code parts such as functions, selected libraries/methods.
    5. 5)  Programmer Catalog: Write down the time you spend for analysis, design, implementation, testing, and reporting. Can other developers reuse your code/ solution? When? How? What are your suggestions to other programmers? Add the source code parts here in the report and explain them. Include your header files and describe the data members and member functions of the abstract data types (classes) in your project. This part is the manual for programmers. Explain your design details.
    6. 6)  User Catalog: How can one use your code for other purposes / for other data? Prepare the user manual of the program (might use screenshots). State the restrictions, if any—your suggestions to users. This part is the user guide of the program.
  3. 5)  Results, Discussion and Conclusion: Your program results. Which methods have you used? Why? Visual statements are preferable. Evaluation and comments might be listed. Discuss your results and conclude with several statements about several aspects of your solution. You may use whatever is necessary to explain your statements. Your grading to your project.
  4. 6)  References:Resourcesyouhaveusedtopreparetheprojectandthereport.Usenumbers that are indicated in the text.

8. Notes

  • Do not miss the deadline.
  • Save all your work until the assignment is graded.
  • The assignment must be original, individual work. Duplicate or very similar assignments are both going to be considered as cheating.
  • Write READABLE SOURCE CODE blocks.

BBM203-A2 6

  • You can ask your questions via Piazza (https://piazza.com/hacettepe.edu.tr/fall/ bbm203) and you are supposed to be aware of everything discussed in Piazza.
  • You will use online submission system to submit your experiments. https:// submit.cs.hacettepe.edu.tr/
  • No other submission method (email or etc.) will be accepted. Do not submit any file via e- mail related with this assignment.
  • File hierarchy must be zipped before submitted (Not .rar, only .zip files are supported by the system). You must submit your work with the file hierarchy stated below:

    âž¡ <student_id.zip>/(Required) âž¡ src/(Required)

    âž¡ Main.cpp(Required) âž¡ *.cpp(optional)
    âž¡ *.h(optional)

    âž¡ Report.pdf(Required) 9. Policy

  • C-LinkedList-main-wutvff.zip