I need help from a C++ Programmer that knows linked list with template classes
PLEASE OPEN THE FILE THAT IS ON THE LINK I PROVIDED. SEE THE CODE I WROTE ALREADY This program HAS TO BE DONE WITH CLASSES C++ Program help Could somebody help me out to write the c++ code for this program that my professor wants. My professor said that we need to create the function location first and based on that location function we can sort the linklist. This is what I have written so far -------------------------------------------------------------------------- http://www.filedropper.com/finalprogram_1 ----------------------------------------------------------------------------- This is the TXT file I have to read from -------------------------------------------------------------------------- http://www.filedropper.com/data1_2 ------------------------------------------------------------------------- I have a bug either in my Display Function or in my Add Funtion that is making the lowest values of my list 0 0 0 and is skipping one node from the file. Just run it and you see what I mean. The last node is supposed to be: 281393 Choudhury, Jacob 45 55 65 Objective: The purpose of this project is to expose you to: Applying analysis, design and implementation of a linked list using dynamic data structure, discrete methods such as recursion are utilized in solution, objects classes are used in constructing a multi file project. RAM organization and the use of “this” pointer to accomplish tasks; in addition to using referenced parameters as constant, all methods are implemented in a procedure like programming to implement class objects and operations. . Problem Specification: You are to submit the analysis, design and implementation of a bag that maintains an ordered linked list. Details: Each node’s data consists of: id number (5 digits), Name, 3 test scores of the same type (all are: integers, floats or doubles). This data is provided in the attached file. Your program must read the data from the file and place it in the linked list in ascending order. Each Node of the list contains the data above, and a pointer to the next node. You are to define the Node class in a header file. Methods that will maintain the list are stored in a C++ implementation file. The client C++ file will contain code that interacts with the user using a menu like interface to test operations on the sorted list. You may choose to define a child class that inherits the Node class. ------------------------------------------------------------------------------------------------------------------------- Methods may include but are not limited to the following: Functions to create: Add is a method that adds a Node at its appropriate position. Location is a method that returns a pointer to where action may take place. (Recursive) Remove is a method that removes a selected Node if it exists, returns true or false. Clear is a method that clears the list of all the Nodes, but before a Node is deleted, it calls a print method that prints the Node data to a file. All nodes that are created using the new operator must be de-allocated, deleted. Peek is an accessor method that displays, on the screen, the data in the Node given the students name, if the Node with name does not exist the method will display that. The list is unchanged. Average is a method that calculates the average(average is not a data member). Grade is a method that calculates the grade(grade is not a data member). ------------------------------------------------------------------------------------------------------------------------------------ Other functions may be used such as getData(), setNext() … as explained in the book. Create as many ”.h” header files as needed and write your own “.cpp” file that is a driver containing a menu like choices to drive the project. Loading the list is not a menu option, it’s done automatically.
Join our real-time social learning platform and learn together with your friends!