Question: looking at this template. how do i add the functions asked of me below each of the comments? Edit View Build Project 2 Toos Debug_Test

 looking at this template. how do i add the functions asked
of me below each of the comments? Edit View Build Project 2
looking at this template. how do i add the functions asked of me below each of the comments?

Edit View Build Project 2 Toos Debug_Test Ana yze Debugx86 H Extensions Winca Local Windows Dee tionary. h A bagh + x bagtestmain.cpp Lab1 Soragits once k vpair.h Bag dictionaryADT. 3 4 5 #include #include "book.h" Provide sample template arguments for IntelliSense template class Bag { public: Bag() {} virtual Bag() {} // base constructor // base destructor 1/ Insert a new item into the bag -- return false if fails and true if // successful virtual bool addItem(const E& item) - @; 1/ Looks for 'item' in the bar and if found updates "item with the // bag value and returns true. Otherwise 'item' is left unchanged // and the method returns false. virtual bool remove(E& item) - @; // Removes the top record from the bag, puts it in return value, and Il returns true if the bar is not empty. If the bag is empty the // function returns false and return value remains unchanged. virtual bool remove Top(E& return value) - @; 1/ Finds the record using return value and if the record is found updates // return value based on the contents of the bag and returns true. If the 1/ record is not found the function returns false. Works just like remove() // except that the found record is not removed from the bag. virtual bool find(E & return value) const -; 2 AO 6 In 6 Col 22 Ch 22 A e Edt View M EN Project Bu'd 2- Debug Debug Test Anayze x86 Too S. Extensions Win Loca Windows ctionary.h Abag. hu X bagtestmain.cop kvpair.h Bag dictionaryADT. Labi B d s. the record using return value and !f the records found Uscates return value based on the contents of the bag and returns true. 1+ the 17 record is not found the function returns false: Works just like removed 1/ except that the found record is not removed from the bag. virtual bool find(E& return value) const - @; // Inspect the top of the bag. If the bag is empty return // false and leave 'item' unchanged; otherwise, return true and update H 'item' with the contents of the bag. virtual bool inspectTop(E& item) const - ; 1/ empties the bag virtual void emptyBag() - ; // use the operator to add an item to the bag virtual bool operator+(const E& addend) = 0; // get the number of items in the bag virtual int size() const - @; Il get the capacity of the bag (size of your bag's array) virtual int bagCapacity() const - @; #endif /* BAGADT_H */ 2 A0 In 6 Col 22 Ch 22 Edit View Build Project 2 Toos Debug_Test Ana yze Debugx86 H Extensions Winca Local Windows Dee tionary. h A bagh + x bagtestmain.cpp Lab1 Soragits once k vpair.h Bag dictionaryADT. 3 4 5 #include #include "book.h" Provide sample template arguments for IntelliSense template class Bag { public: Bag() {} virtual Bag() {} // base constructor // base destructor 1/ Insert a new item into the bag -- return false if fails and true if // successful virtual bool addItem(const E& item) - @; 1/ Looks for 'item' in the bar and if found updates "item with the // bag value and returns true. Otherwise 'item' is left unchanged // and the method returns false. virtual bool remove(E& item) - @; // Removes the top record from the bag, puts it in return value, and Il returns true if the bar is not empty. If the bag is empty the // function returns false and return value remains unchanged. virtual bool remove Top(E& return value) - @; 1/ Finds the record using return value and if the record is found updates // return value based on the contents of the bag and returns true. If the 1/ record is not found the function returns false. Works just like remove() // except that the found record is not removed from the bag. virtual bool find(E & return value) const -; 2 AO 6 In 6 Col 22 Ch 22 A e Edt View M EN Project Bu'd 2- Debug Debug Test Anayze x86 Too S. Extensions Win Loca Windows ctionary.h Abag. hu X bagtestmain.cop kvpair.h Bag dictionaryADT. Labi B d s. the record using return value and !f the records found Uscates return value based on the contents of the bag and returns true. 1+ the 17 record is not found the function returns false: Works just like removed 1/ except that the found record is not removed from the bag. virtual bool find(E& return value) const - @; // Inspect the top of the bag. If the bag is empty return // false and leave 'item' unchanged; otherwise, return true and update H 'item' with the contents of the bag. virtual bool inspectTop(E& item) const - ; 1/ empties the bag virtual void emptyBag() - ; // use the operator to add an item to the bag virtual bool operator+(const E& addend) = 0; // get the number of items in the bag virtual int size() const - @; Il get the capacity of the bag (size of your bag's array) virtual int bagCapacity() const - @; #endif /* BAGADT_H */ 2 A0 In 6 Col 22 Ch 22

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!