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 FILEYou will implement 3 constructors: SEE PICTURE 1Front and BackMember functions to get the first and last element of the deque. These functions should work in constant time.SEE PICTURE 2Operator[]Access an element of the deque by its index. This function should work in constant time.SEE PICTURE 3
Push/Pop Back/FrontAdd/Remove an element from the front or back of the deque. These functions should work in constant amortised time.SEE PICTURE 4Functions Related to the Number of ElementsTwo functions related to the number of elements in the MyDeque. These should work in constant time. SEE PICTURE 5The CodeThere are three files provided in the scaffold.THESE ARE INCLUDED IN THE “IMPLEMENT A DEQUE” ZIP FILEThe
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. The implementation file myDeque.cpp. This is where you should implement all the required member functions.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.

We offer the bestcustom writing paper services. We have done this question before, we can also do it for you.

Why Choose Us

  • 100% non-plagiarized Papers
  • 24/7 /365 Service Available
  • Affordable Prices
  • Any Paper, Urgency, and Subject
  • Will complete your papers in 6 hours
  • On-time Delivery
  • Money-back and Privacy guarantees
  • Unlimited Amendments upon request
  • Satisfaction guarantee

How it Works

  • Click on the “Place Order” tab at the top menu or “Order Now” icon at the bottom and a new page will appear with an order form to be filled.
  • Fill in your paper’s requirements in the "PAPER DETAILS" section.
  • Fill in your paper’s academic level, deadline, and the required number of pages from the drop-down menus.
  • Click “CREATE ACCOUNT & SIGN IN” to enter your registration details and get an account with us for record-keeping and then, click on “PROCEED TO CHECKOUT” at the bottom of the page.
  • From there, the payment sections will show, follow the guided payment process and your order will be available for our writing team to work on it.