Question: Programming Assignment For the first programming assignment, we are going to create a program that helps keep track o Part I: The Engineer ADT The

Programming Assignment
For the first programming assignment, we are going to create a program that helps keep track o
Part I: The Engineer ADT
The information about a engineer should include:
First name (e.g., Jane)
use dynamically allocated cstring and it should be just big enough, e.g. for a first name "Jane", only 5 chars should be allocated
Last name (e.g., Smith)
same implementation rules as first name
Title level (L1-L8)
use enum or named constants for this
Assessment level (1-5)
1-5 have the following meanings respectively: unacceptable, needs improvement, meets expectations, exceeds expectations, outstanding)
you have your own implementation choice for this, but when showing it to user, it should be the more meaningful descriptions, e.g. outstanding instead of 5
Part II: The EngineerList ADT
The data members for EngineerList should be a head pointer to a linear linked list of Engineer objects and the number of engineers in the list. The engineers should be organized by last names, then first names if the last names are the same, alphabetically. Please do NOT use a sorting algorithm. Instead you need to keep the list sorted all the time which means each add should insert the object to the correct position.
This ADT must have public member functions to perform the following:
Constructor - Construct an object and initialize the data members
Destructor - Release all dynamic memory
Add a new engineer by inserting it according to the order of the list which is sorted by names
Promote an engineer by increasing the title level by 1 with the highest possible level as 8
Edit the assessment level of an engineer identified by index (You should first show all engineers with indices)
Display all engineers in the list sorted by name (in order of last name, then first name meaning if the last names are the same, order them by first names)
Display all engineers of a certain level
Remove all engineers with performance rating 1
Part III: The driver or the test program
The test program needs to first load the test data set from external file at the beginning of the program.
The menu-based user interface should allow user to use/test ALL the functionalities of the program. Try to make the user interface easier to use.
Always prompt user when you need input data.
The prompt needs to be meaningful. Example works great. E.g.Enter the assessment level (5 for outstanding, 4 for ...etc):
When asking user to choose some existing data, index works great. You can display the data with index preceding each one first.
Things you should know...as part of your program
General Syntax Rules
Do not use statically allocated arrays in your classes or structures. All memory must be dynamically allocated and kept to a minimum for the classes! You can only use statically allocated arrays for temporary storage, such as local variables.
Global variables are not allowed in CS260; global constants are encouraged
Do not use the String class! (use cstring, arrays of characters instead); you may use the cstring library with strlen, strcpy, strcmp etc
Avoid using return from within the body of a loop
Avoid using while(1) type of syntax
Strive towards structured programming techniques
Remember that at least one function needs to be written using recursion!
For functions that have non-void return types, make sure to return a value through each path through the function.
NEVER pass class types by value (always by reference); NEVER return class types by value. If you dont want the objects modified, put const there.
Use the iostream library for all I/O; do not use stdio.h for I/O
Use of external data files is required
MOST IMPORTANT: BACKUP your files before creating a TAR archive!!!!
General Rules of Building ADTs
The ADTs should be designed to hide the data structure as part of the private section of the class. This means your head pointer to a node should be a private data member in your ADT.
All data members in a class must be private
Public member functions should NEVER have a node pointer as an argument (Remember client programs should not be involved with the physical data structure when working with ADTs)
Never prompt and read from the user when inside a class member function; this should be done in the client program when developing ADTs
Never output error messages from a class member function; this should also be done in the client program when developing ADTs
Each public member function should have a way to communicate success or failure back to the client program. This can be done with a returned value, and argument passed by reference, or exception handling.
Use modular design, separating the .h files from the .cpp files. Remember, .h files should contain the class header and any necessary prototypes. The .cpp files should contain function definitions. You must have at least 1.h file and 2.cpp files.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!