Question: [ Programming Problem ] Problem 1 6 is implementation of Dummy Sorted Linked List. In dummy sorted linked list, List has a dummy node. Node
Programming Problem
Problem is implementation of Dummy Sorted Linked List. In dummy sorted linked
list, List has a dummy node. Node is inserted by ascending order.
In this problem, Person is base class and Student & Worker are derived class. List
handles derived classes as node through pointer of bass class.
Implement Student.cpp
Implement functions of Student
Refer Person.cpp Person.h Student.h main.cpp
Result of Printinfo function is like below
Nane : Choi, Age : Major : EEE
Nane : Kim, Age : Hajor : EEE
You can write the function declared in studenth in student.cpp
Implement Worker.cpp
Implement functions of Worker
Refer Person.cpp Person.h Worker.h main.cpp
Result of Printinfo function is like below
Nane : Lee, Age : Company : Samsung
Nane : Park, Age : Company : LG
You can write the function declared in Workerh in Worker.cpp
Implement Problem in SortList.cpp
Implement List:: List
Free all memory allocated for nodes
Implement void List::PrintList
Print out all nodes' data in List from first node to last node
Use Nodes' Printinfo function
If List is empty, Print out "Empty"
Implement void List::InsertPerson newPerson
Link argument at proper position in list by ascending order for name
Implement void List::Deleteconst char name
Delete node whose member variable "name" is same with Argument "name"
If there aren't any nodes that satisfy condition, Print out "Name is not found
in List"
If List is empty, Print out "Empty"
You can use Strcmp Strlen, Strcpy
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
