Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Write the definitions of the function copyList. the copy constructor, and the fu

ID: 3626462 • Letter: W

Question

Write the definitions of the function copyList. the copy constructor, and the function to overload the assignment operator for the class doublyLinkedList. Write a program to test various operations of the doublyLinkedList. (Circular linked lists. This chapter defined and identified various operations on a circular linked list. Write the definitions of the class circularLinkedList and its member functions. (You may assume that the elements of the circular linked list are in ascending order.) Write a program to test various operations of the class defined in (a). (Video Store programming example) Complete the design and implementation of the class customer Type defined in the Video Store programming example, Design and implement the cIass customerListType to create and maintain a list of customers for the video store.

Explanation / Answer

Did #13. My editor crashed (0.o) so I can't debug it until later tonight (in about 6 hours). Let me know how it works. ----------------------------------------------------------------------------- # include # include # include # include int display_menu(); struct link_list { int no; struct link_list *next; }; class link { link_list *list; public: link_list *head; link() { list=NULL; head=NULL; } void get_list(); void display_list(); void insert(); void delete_list(); void sort(); void merge(link_list *,link_list*); friend void union_list(link_list *,link_list *); friend void intersact(link_list *,link_list *); void reverse(); }; void link :: get_list() { int no; if(head!=NULL) { while(list->next!=head) { delete(list); list=list->next; } list=NULL; head=NULL; } while(1) { coutno; if(no!=0) { if(list==NULL) { list=new link_list; head=list; } list->no=no; list->next = new link_list; list=list->next; } else { list->next=head; break; } } } void link :: display_list() { list=head; coutnext=list->next->next; return; } list=list->next; } coutnext) { for(j=head;j->next!=head;j=j->next) { if(i->no no) { t->no=i->no; i->no=j->no; j->no=t->no; } } } } void link :: reverse() { int a[50]; list=head; int i=0; while(list->next!=head) { a[i]=list->no; list=list->next; i=i+1; } int n=i-1; i=n; list=head; while(list->next!=head) { list->no=a[i]; list=list->next; i=i-1; } } list->next=head; } list->next=head; } int main() { clrscr(); link l1 while(1) { switch(display_menu()) { case 1: l1.display_list(); l1.insert(); break; case 2: l1.display_list(); break; case 3: l1.display_list(); l1.delete_list(); getch(); break; case 4: cout