C++ Program help Could somebody help me out to write the c++ code for this progr
ID: 3697575 • Letter: C
Question
C++ Program help
Could somebody help me out to write the c++ code for this program that my professor wants.
This is what I have written so far
http://www.filedropper.com/finalprogram
This is the TXT file I have to read from
http://www.filedropper.com/data1_2
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:
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.
Explanation / Answer
#include using namespace std; /* * Node Declaration */ struct node { int info; struct node *next; }*start; /* * Class Declaration */ class single_llist { public: node* create_node(int); void insert_begin(); void insert_pos(); void insert_last(); void delete_pos(); void sort(); void search(); void update(); void reverse(); void display(); single_llist() { start = NULL; } }; /* * Main :contains menu */ main() { int choice, nodes, element, position, i; single_llist sl; start = NULL; while (1) { coutRelated Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.