Need help with your Discussion

Get a timely done, PLAGIARISM-FREE paper
from our highly-qualified writers!

glass
pen
clip
papers
heaphones

Toy Version of A Deque Programming Worksheet

Toy Version of A Deque Programming Worksheet

Toy Version of A Deque Programming Worksheet

Description

Implement a toy version of a deque using two std::vectors.
The type of element the deque holds can be passed as a template
parameter and we will test your solution instantiating the template type
with int, double, char, and std::string. You are not allowed to use std::deque
itself in this exercise. There are 5 groups of member functions that
you need to implement for this assignment, which we now describe.

Constructors:

NOTE: ALL PICTURES ARE IN THE “PICTURES” ZIP FILE

You will implement 3 constructors:

SEE PICTURE 1

Front and Back

Member functions to get the first and last element of the deque. These functions should work in constant time.

SEE PICTURE 2

Operator[]

Access an element of the deque by its index. This function should work in constant time.

SEE PICTURE 3

Push/Pop Back/Front

Add/Remove an element from the front or back of the deque. These functions should work in constant amortised time.

SEE PICTURE 4

Functions Related to the Number of Elements

Two functions related to the number of elements in the MyDeque. These should work in constant time.

SEE PICTURE 5

The Code

There are three files provided in the scaffold.THESE ARE INCLUDED IN THE “IMPLEMENT A DEQUE” ZIP FILE

  1. The
    header file myDeque.hpp contains the definitions of all member
    functions of the MyDeque class. We provide a scaffold here, but you are
    free to add member variables and helper member functions as needed.
  2. The implementation file myDeque.cpp. This is where you should implement all the required member functions.
  3. As
    usual we provide a file main.cpp for your own testing and debugging
    purposes. This is the file that is compiled and executed when “Run” is
    pressed. You can modify this file as you like. The marker does not
    make use of this file.
Explanation & Answer:

Worksheet
User generated content is uploaded by users for the purposes of learning and should be used following our’s honor code & terms of service.

Have a similar assignment? "Place an order for your assignment and have exceptional work written by our team of experts, guaranteeing you A results."

Order Solution Now

Our Service Charter


1. Professional & Expert Writers: Essay Noon only hires the best. Our writers are specially selected and recruited, after which they undergo further training to perfect their skills for specialization purposes. Moreover, our writers are holders of masters and Ph.D. degrees. They have impressive academic records, besides being native English speakers.

2. Top Quality Papers: Our customers are always guaranteed of papers that exceed their expectations. All our writers have +5 years of experience. This implies that all papers are written by individuals who are experts in their fields. In addition, the quality team reviews all the papers before sending them to the customers.

3. Plagiarism-Free Papers: All papers provided by Essay Noon are written from scratch. Appropriate referencing and citation of key information are followed. Plagiarism checkers are used by the Quality assurance team and our editors just to double-check that there are no instances of plagiarism.

4. Timely Delivery: Time wasted is equivalent to a failed dedication and commitment. Essay Noon are known for the timely delivery of any pending customer orders. Customers are well informed of the progress of their papers to ensure they keep track of what the writer is providing before the final draft is sent for grading.

5. Affordable Prices: Our prices are fairly structured to fit in all groups. Any customer willing to place their assignments with us can do so at very affordable prices. In addition, our customers enjoy regular discounts and bonuses.

6. 24/7 Customer Support: At Essay Noon, we have put in place a team of experts who answer all customer inquiries promptly. The best part is the ever-availability of the team. Customers can make inquiries anytime.

We Can Write It for You! Enjoy 20% OFF on This Order. Use Code SAVE20

Stuck with your Assignment?

Enjoy 20% OFF Today
Use code SAVE20