Question

C++ programming implement a struct int Container similar to C++’s standard template library std::vector but without using Object Oriented Programming.

0001.jpg0002.jpg0003.jpg0004.jpg



Assignment Description: We will implement a struct int Container similar to C++’s standard template library std::vector but without using Object-Oriented Programming. The Container struct will only have member variables and user-defined helper functions that will assist with constructing and destructing instances of the Container type, and to add items to the Container, check the length of the Container, etc. See below for function prototypes and descriptions. 

User-Defined Helper-Functions and Container Member Variables The helper-functions that operate on the Container data type will be written as user-defined functions similar to Assignment 3. The member variables and helper functions are listed below and have similar functionality to those in the C++ standard std::vector class. Only a subset of functionality, similar to std::vector’s member functions, will be implemented for Assignment 4. The exception handling is optional.



0 0
Add a comment Improve this question Transcribed image text
Request Professional Answer

Request Answer!

11 have requested this problem solution

The more requests, the faster the answer.

Request! (Login Required)


All students who have requested the answer will be notified once they are available.
Know the answer?
Add Answer to:
C++ programming implement a struct int Container similar to C++’s standard template library std::vector but without using Object Oriented Programming.
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Similar Homework Help Questions
  • dont use a struct use the std::stack library In this assignment, you will finish the implementation...

    dont use a struct use the std::stack library In this assignment, you will finish the implementation of an iterative solution to the Towers of Hanoi puzzle. Specifically, you will implement the puzzle initialization and the move operation utilizing the stacks provided. Do not rename existing functions, nor add any additional functions nor member variables! REQUIREMENTS The program will read in a text file with containing a single integer: the number of disks for the puzzle. The program will output the...

  • C++ Object-Oriented Programming - Program using structs, functions, and a little of overloaded functions. The finished...

    C++ Object-Oriented Programming - Program using structs, functions, and a little of overloaded functions. The finished program should look exactly like the part at the bottom in gray text. Create two structures and name the types Account and Money. The Money struct has two variables One represents how many dollars you have The other represents h ow many cents you have .The Account struct has three variables - A Money struct that will represent how much money is in the...

  • This is a standard C++ programming assignment using a command line g++ compiler or the embedded...

    This is a standard C++ programming assignment using a command line g++ compiler or the embedded one in zyBooks. No GUI forms and no Visual Studio. No external files and no databases are used. There is only one object-oriented program to complete in this assignment. All code should be saved in a file named ExamScoresUpdate.cpp, which is the only file to submit for grading. No .h files used. The .cpp file contains main() and two classes, ExamScores and DataCollector. There...

  • Objectives You will implement and test a class called MyString. Each MyString object keeps track ...

    Objectives You will implement and test a class called MyString. Each MyString object keeps track of a sequence of characters, similar to the standard C++ string class but with fewer operations. The objectives of this programming assignment are as follows. Ensure that you can write a class that uses dynamic memory to store a sequence whose length is unspecified. (Keep in mind that if you were actually writing a program that needs a string, you would use the C++ standard...

  • Need help doing program In bold is problem E2 #include<iostream> #include<string> #include<vector> using namespace std; //Car...

    Need help doing program In bold is problem E2 #include<iostream> #include<string> #include<vector> using namespace std; //Car class //Defined enum here enum Kind{business,maintenance,other,box,tank,flat,otherFreight,chair,seater,otherPassenger}; //Defined array of strings string KIND_ARRAY[]={"business","maintenance","other,box","tank,flat","otherFreight","chair","seater","otherPassenger"}; class Car { private: string reportingMark; int carNumber; Kind kind; //changed to Kind bool loaded; string destination; public: //Defined setKind function Kind setKind(string knd) { for(int i=0;i<8;i++) //repeat upto 8 kinds { if(knd.compare(KIND_ARRAY[i])==0) //if matched in Array kind=(Kind)i; //setup that kind } return kind; } //Default constructor Car() { } //Parameterized constructor...

  • #include <iostream> #include <iomanip> #include <vector> using namespace std; Part 1. [30 points] In this part,...

    #include <iostream> #include <iomanip> #include <vector> using namespace std; Part 1. [30 points] In this part, your program loads a vending machine serving cold drinks. You start with many foods, some are drinks. Your code loads a vending machine from foods, or, it uses water as a default drink. Create class Drink, make an array of drinks, load it and display it. Part 1 steps: [5 points] Create a class called Drink that contains information about a single drink. Provide...

  • In C++ Please!!!!! Example main: #include <iostream> #include <fstream> #include <istream> #include <cstring> using namespace std;...

    In C++ Please!!!!! Example main: #include <iostream> #include <fstream> #include <istream> #include <cstring> using namespace std; const int MAXRESULTS = 20; // Max matches that can be found const int MAXDICTWORDS = 30000; // Max words that can be read in int main() { string results[MAXRESULTS]; string dict[MAXDICTWORDS]; ifstream dictfile; // file containing the list of words int nwords; // number of words read from dictionary string word; dictfile.open("words.txt"); if (!dictfile) { cout << "File not found!" << endl; return...

  • I've posted 3 classes after the instruction that were given at start You will implement and...

    I've posted 3 classes after the instruction that were given at start You will implement and test a PriorityQueue class, where the items of the priority queue are stored on a linked list. The material from Ch1 ~ 8 of the textbook can help you tremendously. You can get a lot of good information about implementing this assignment from chapter 8. There are couple notes about this assignment. 1. Using structure Node with a pointer point to Node structure to...

  • This C++ Program consists of: operator overloading, as well as experience with managing dynamic memory allocation...

    This C++ Program consists of: operator overloading, as well as experience with managing dynamic memory allocation inside a class. Task One common limitation of programming languages is that the built-in types are limited to smaller finite ranges of storage. For instance, the built-in int type in C++ is 4 bytes in most systems today, allowing for about 4 billion different numbers. The regular int splits this range between positive and negative numbers, but even an unsigned int (assuming 4 bytes)...

  • Recursion and Trees Application – Building a Word Index Make sure you have read and understood...

    Recursion and Trees Application – Building a Word Index Make sure you have read and understood ·         lesson modules week 10 and 11 ·         chapters 9 and 10 of our text ·         module - Lab Homework Requirements before submitting this assignment. Hand in only one program, please. Background: In many applications, the composition of a collection of data items changes over time. Not only are new data items added and existing ones removed, but data items may be duplicated. A list data structure...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT