This assignment represents two grades. The grade obtained in this assignment will be your final project and final exam grades.
The objective of this assignment is to recreate some of the behavior of the following templates defined in the Standard Template Library: Array. Queue. List. The above mentioned templates are defined in the standard template library; STL: https://www.cplusplus.com/reference/stl/
If Now, you must design and implement your own templates for array, queue and list. For the array template you must recreate the following operations: Fill. Swap. Testing: Stl.fill and user.fill.
Here Stl is an array from the STL and user is the array template that you designed and implemented.
FINAL PROJECT FINAL EXAM.
C++ II.
FALL 2021.
This assignment represents two grades. The grade obtained in this assignment will be your final
project and final exam grades.
The objective of this assignment is to recreate some of the behavior of the following templates
defined in the Standard Template Library:
Array.
Queue.
List.
The above mentioned templates are defined in the standard template library; STL:
https://www.cplusplus.com/reference/stl/
If you click on array, in the above list, you will see a list of methods for this object like the
following:
Click on array, on the right, and then a list of methods will be shown:
Repeat the process for the list and queue to access the respective methods.
Now, you must design and implement your own templates for array, queue and list. For the array
template you must recreate the following operations:
Fill.
Swap.
Testing:
Stl.fill and user.fill.
Here Stl is an array from the STL and user is the array template that you designed and
implemented.
Run these commands for each object, Stl and user, for at least three different data types. Prove
that your implementation produces the same outputs produced by the array object defined in
the STL. Use pictures from your compiler outputs, concise comments to document your proof.
Here you must implement display functions for the array template from the STL and your own
array template. Display functions will display the elements of the arrays. Include pictures of your
C++ code that shows the sections of code that you are demonstrating.
Queue.
Design and implement your own deque template and simulate the following behavior.
Swap.
Here you must implement a displayElements function to demonstrate the initial and final state
of the queues. I.e. display the elements of the queues before and after the swap call. Clearly
document, with pictures and concise comments, the outputs from the STL queue and your own
queue. Include pictures of your C++ code to complement your demonstration or proof. Run your
program and proofs for at least three different data types.
List:
Erase.
Design and implement your own list template and implement the erase operation. The erase
operation consist of two possibilities: erase one element or erase a range of elements. Proof with
pictures and concise comments both cases of the erase operation using your own list template.
Here you must implement displayElements function to display the elements in the list before and
after the erase operation for both cases.
Here you are free to implement the above cases using an approach that you consider is the right
one. Ex: You may choose to implement the above requirements using only one program or create
three program where each program demonstrate the intended case.
The point is that you must run your programs using the STL objects and the specified functions
or behaviors to demonstrate that you know how to use them. Here you must implement a
displayElements functions to demonstrate the initial and final state of the object after using the
respective functions. Example: For the array template create an array object, show the elements
of the array, call the swap operation and show the elements of the array. Do this for at least three
different data types.
Repeat the process for queues and list.
Once you feel comfortable working with the mentioned objects, arrays, queues, list from the STL
and the methods specified for each one then you must design and implement your own
templates for array, list, queues and the specified methods. Test and document the workings of
your templates for at least three different data types.
For example: Your array template must have at least the following methods or member functions
must be implemented:
Fill.
Swap.
DisplayElements.
Destroy.
For your list template at least the following methods or functions must be implemented:
Fill
EraseOneObject.
EraseRangeOfObjects.
DisplayElements.
Destroy.
For your queue template at least the following methods or member functions must be
implemented:
Fill
Swap.
DisplayElements.
Destroy.
Regardless of the program structure you choose, the user always have the option to terminate
or repeat the program.
You must create a lab report and called final.pdf.
Your lab report must contain at least the testing section where your clearly and specifically
demonstrate that your programs are working as intended. Use pictures, concise comments,
pictures of your C++ to document your proofs for each specified case.
Point allocation.
20 Points:
Using STL objects for at least three different data types.
Proof array and fill, swap, displayElements and destroy.
Proof list and eraseOne, eraseRange, display and destroy.
Proof queue and swap, display and destroy.
50 points.
Using your own template objects for at least three different data types.
Proof array and fill, swap, displayElements and destroy.
Proof list and eraseOne, eraseRange, display and destroy.
Proof queue and swap, display and destroy.
ADDITIONAL REQUIREMENTS:
The data types used with the STL objects must be the same data types used with your
own template object. Use the same values for comparison.
Every object must contain at least 10 elements.
Run each method or function at least 5 times for each object.
20 Points:
Create a two column table or any other form of presentation to show that the results are the
same using STL object or your own template. Just be sure you format your presentation in a clear
and professional way to convey the expected results. Your results must be presented in a clear,
legible, logical, orderly way. If appropriated make concise comments to clarify what your are
doing.
The outputs from any implementation must be the same.
OBJECT Array from STL Array my Own Template
Fill the array with values
Display Elements: Paste Output Here Paste Output Here
Swap
Display Elements
Destroy
Display Elements Paste Output Here Paste Output Here
Remember that each operation must be run at least five times for each data type. And you must
use at least three different data types for each run of your template and STL object. So, more
rows must be required.
OBJECT List from STL List my Own Template
Fill the list with values
Display Elements: Paste Output Here Paste Output Here
Erase One value
Display Elements Paste Output Here
Erase a range of objects
Display Elements Paste Output Here Paste Output Here
Destroy Paste Output Here Paste Output Here
Remember that each operation must be run at least five times for each data type. And you must
use at least three different data types for each run of your template and STL object. So, more
rows must be required.
OBJECT Queue from STL Queue my Own Template
Fill the list with values
Display Elements: Paste Output Here Paste Output Here
Swap
Display Elements Paste Output Here
Display Elements Paste Output Here Paste Output Here
Destroy
Remember that each operation must be run at least five times for each data type. And you must
use at least three different data types for each run of your template and STL object. So, more
rows must be required.
10 Points.
Txt files with your C++ code for all objects specified.
The due date for this project is November 29.
Any question? Just email me.
DescriptionIn this final assignment, the students will demonstrate their ability to apply two ma
Path finding involves finding a path from A to B. Typically we want the path to have certain properties,such as being the shortest or to avoid going t
Develop a program to emulate a purchase transaction at a retail store. Thisprogram will have two classes, a LineItem class and a Transaction class. Th
1 Project 1 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of
1 Project 2 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of