Question: c++ code: LinkedList.h #ifndef LINKEDLIST_H_INCLUDED #define LINKEDLIST_H_INCLUDED #include using namespace std; class LinkedList { private: struct list { string data; list *next; }; list *head;

c++ code:
LinkedList.h
#ifndef LINKEDLIST_H_INCLUDED #define LINKEDLIST_H_INCLUDED
#include
using namespace std;
class LinkedList
{ private:
struct list { string data; list *next; };
list *head;
public:
// Constructor LinkedList();
// Linked list operations
void insert(string); void visit() ; void delet(string); int isEmpty(); void mergeSort(); };
#endif // LINKEDLIST_H_INCLUDED
LinkedList.cpp
#include
using namespace std;
int LinkedList::isEmpty() { if(head==NULL) return 0; else return 1; } void LinkedList::insert(string data) { list *node = new list; node->data = data; node->next = NULL;
list *tmp=head;
if(tmp == NULL) { tmp = node; head=tmp;
}
else{ tmp=head; while(tmp->next) {
tmp=tmp->next; } tmp->next=node;
}
}
void LinkedList::delet(string str) { list *tmp=head,*prev=NULL; if(tmp==NULL){ cout
while(tmp!=NULL){
if(tmp->data==str ){ if( prev==NULL){ head=tmp->next; return ; } else{ prev->next=tmp->next; return; } } else tmp=tmp->next;
} } }
void LinkedList::mergeSort() { // MergeSort(head); }
void LinkedList::visit(){ list *nodeptr=head;
cout
while(nodeptr!=NULL){ coutdatanext;
} }
main.cpp
#include
using namespace std;
int main() {
LinkedList ll;
ll.insert("aaa"); ll.insert("bbb"); ll.insert("sas"); ll.insert("ddd");
ll.visit();
return 0; }
Background Our purpose is to understand what the 0OD process looks like in a simple example. In particular, you should take the program you developed from assignment 5 and develop OOD documentation (reverse engineering) for that program. You are expected to create and submit a design record (aka "notebook" pages) that includes evidence that you followed these steps. Note that the process is really iterative as details are worked out. Step 1: Requirements Analysis Start by itemizing the requirements. Try to break them down into small pieces. Step 2: Concept Development Write a few sentences in English prose that describe your concept of how this linked list software could be used. Step 3: Use Case Diagrams. Draw a top-level use case diagram with bubbles and names for the functions that the software performs. In particular, you want to define the uses for software. Think about what you expect the user to see and do with your package Step 4: Class Diagrams. Now define your classes and figure out what methods and data it will expose. Create a class diagram for each type of object you will code. Include all the public interface, and any important private state variables for the objects Step 5: Sequence diagrams Each of the use cases needs to be broken down into a sequence of interactions by the classe to complete the sequence diagrams. You should address both sunny-day and rainy day seenario if the software is accessed through its user interface. Draw at least one sequence (ping-pong) diagram for a sunny day, and another for a rainy day for each use case. Step 6: Submit Your Results You may want to clean up your code for Assignment 5 based on the design you have row The working code with header files and usual jpg inages will go into a D2L drop box whh finished. Don't forget to fake shots of your SW Engineering Notebook. and submit them as evidence of your work
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
