logo Hurry, Grab up to 30% discount on the entire course
Order Now logo

Ask This Question To Be Solved By Our ExpertsGet A+ Grade Solution Guaranteed

expert
Rahul BansalManagement
(5/5)

993 Answers

Hire Me
expert
Frederick ManhireMarketing
(5/5)

626 Answers

Hire Me
expert
Stanley BaxterComputer science
(5/5)

926 Answers

Hire Me
expert
Ishanat TripathiTechnical writing
(5/5)

658 Answers

Hire Me
C++ Programming

Write constructors, destructors,  and  all necessary member functions such as insert, erase, increment and decrement operators, operator* to dereference,  as well as operator== and operator!= to check whether two iterators are pointing to the same element.

INSTRUCTIONS TO CANDIDATES
ANSWER ALL QUESTIONS

Homework # 6

 

Part I: Theory & Practice

  1. Read Ch 11 and Ch 12.
  2. Practice Problems: R11.5, R11.9, R11.13, P11.1, P11.5, P11.11, R12.7, P12.1, P12.7, P12.14 ( not collected )

Part II : Programming

  1. Coding Exercise (20 points ).

Using good coding practices,  design your own Linked List of  int types.   It will consist of classes List,  Node,   and Iterator granting friendship and defining functions as needed. Write constructors, destructors,  and  all necessary member functions such as insert, erase, increment and decrement operators, operator* to dereference,  as well as operator== and operator!= to check whether two iterators are pointing to the same element. You will then use this list to write the following member functions :

  • List::reverse to reverse your nodes
  • List::push front to add a value to the beginning of a list
  • List::sort to sort the elements of a linked list (without copying them into a vector or another data type)
  • List::merge which accepts another List object and merges the two lists into one, alternating elements from each list such that merging 1 7 12 and 8 3 11 2 2 1 yields the list 1 8 7 3 12 11 2 2

Write a main function to test your list such that it follows the output shown in Figure 1. Compile your code  and run your program to check for compile-time errors and logic errors. Submit your header files and source codes to ccle.ucla.edu in separate files.

Related Questions

. The fundamental operations of create, read, update, and delete (CRUD) in either Python or Java

CS 340 Milestone One Guidelines and Rubric  Overview: For this assignment, you will implement the fundamental operations of create, read, update,

. Develop a program to emulate a purchase transaction at a retail store. This  program will have two classes, a LineItem class and a Transaction class

Retail Transaction Programming Project  Project Requirements:  Develop a program to emulate a purchase transaction at a retail store. This

. The following program contains five errors. Identify the errors and fix them

7COM1028   Secure Systems Programming   Referral Coursework: Secure

. Accepts the following from a user: Item Name Item Quantity Item Price Allows the user to create a file to store the sales receipt contents

Create a GUI program that:Accepts the following from a user:Item NameItem QuantityItem PriceAllows the user to create a file to store the sales receip

. The final project will encompass developing a web service using a software stack and implementing an industry-standard interface. Regardless of whether you choose to pursue application development goals as a pure developer or as a software engineer

CS 340 Final Project Guidelines and Rubric  Overview The final project will encompass developing a web service using a software stack and impleme