subject

(Using Class) Problem Specification:
An employer would like to maintain a linked list for employees, the data stored is an employee number (a positive integer), number of years on the job (a short positive integer) and a yearly salary (a float). Would like you as the programmer to define the required classes in header files, and the methods in implementation files.
The methods used are:
Insert: Which inserts elements at the end of the list, which is the most recent input is at the end of the list.
Remove: which deletes the first element in the list.
Display: its purpose is to display the list but needs the assistance of a Print function.
Print: a recursive function that prints all the elements of the list, last to first.
Clear: a function that deletes every Node from the list and leaves the list empty.
Requirements
Define a class Node containing the employee’s data and a pointer to the next Node
Define the necessary functions to access, instantiate, and set the data in the class Node.
Define a class LinkedList that has only one data member, a pointer to a Node, and the necessary member functions in addition to the member functions above.
All mutator functions parameters are constant referenced, and all accessor functions are constants.
Functions not accessed by the client, should be private.
Grading criteria:
10 points Sufficient comments including specifications
5 points Menu is used to display options and calls methods.
5 points Guards are used.
10 points insert performs it task correctly.
5 points remove performs it task correctly.
5 points display performs it task correctly.
10 points print is recursive and performs it task correctly.
10 points clear performs it task correctly.
10 points all requirements above are included.
15 points Program runs correctly and performs its task correctly.
5 points test run to demonstrate all activities is handed-in.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 18:40
Adna sequence encoding a five-amino acid polypeptide is given below. …… …… locate the sequence encoding the five amino acids of the polypeptide, and identify the template and coding strand.
Answers: 1
question
Computers and Technology, 22.06.2019 15:30
In a compound condition, both conditions on either side of the logical operator and must be true for the overall condition to be true. a: true b: false
Answers: 1
question
Computers and Technology, 23.06.2019 02:00
What is the main benefit of minimizing the ribbon in word? more options will be accessible through customized keystrokes. more of the document will be viewable without needing to scroll. fewer controls will be accessible to the user by using the mouse. fewer editing options will be available without entering a password.
Answers: 1
question
Computers and Technology, 23.06.2019 03:10
Fill in the following program so that it will correctly calculate the price of the orange juice the user is buying based on the buy one get one sale.#include //main functionint main() { int cartons; float price, total; //prompt user for input information printf("what is the cost of one container of oj in dollars? \n"); scanf(" [ select ] ["%d", "%c", "%f", "%lf"] ", & price); printf("how many containers are you buying? \n"); scanf(" [ select ] ["%d", "%c", "%f", "%lf"] ", & cartons); if ( [ select ] ["cartons / 2", "cartons % 1", "cartons % 2", "cartons % price", "cartons / price", "cartons / total"] [ select ] ["=", "==", "! =", "< =", "> =", "< "] 0) total = [ select ] ["price * cartons", "cartons * price / 2 + price", "(cartons / 2) * price", "cartons / (2.0 * price)", "(cartons / 2.0) * price + price", "((cartons / 2) * price) + price"] ; else total = ((cartons / 2) * price) + price; printf("the total cost is $%.2f.\n", total); return 0; }
Answers: 2
You know the right answer?
(Using Class) Problem Specification:
An employer would like to maintain a linked list for emp...
Questions
question
English, 24.03.2021 23:50
question
Mathematics, 24.03.2021 23:50
Questions on the website: 13722361