![subject](/tpl/images/cats/informatica.png)
Computers and Technology, 25.07.2020 05:01 uverworldxdz4999
In the linked-list based bag implementation, we demonstrated the functionalities, such as, add, remove, and list. Extend the functionalities of the bag with other operations average, min, and max, You need to extend the Bag class (under Wk 2, BagLinked_List. cpp) with the following methods:
-int Bag::min( ), is to find minimum of items of the bag.
-int Bag::max( ), is to find maximum of items of the bag
-float Bag::ave( ), is to find average of the items of the bag.
After expanding the Bag class with these functions, demonstrate their functionalities with a similar to:
Create a bag A with the items 8, 4, 5, 6, 1, 3; and create another bag, B, with the items 4, 6, 9, 2.
Then show that:
cout << A. min() << ", " << A. max() << ", " << A. ave () ;
cout << B. min() << ", " << B. max() << ", " << B. ave () ;
![ansver](/tpl/images/cats/User.png)
Answers: 2
![](/tpl/images/ask_question.png)
![](/tpl/images/ask_question_mob.png)
Other questions on the subject: Computers and Technology
![image](/tpl/images/cats/informatica.png)
Computers and Technology, 22.06.2019 19:20, SundaeSunday
Consider the following code snippet: #ifndef cashregister_h#define cashregister_hconst double max_balance = 6000000.0; class cashregister{public: cashregister(); cashregister(double new_balance); void set_balance(double new_balance); double get_balance() const; private: double balance[12]; }; double get_monthly_balance(cashregister bk, int month); #endifwhich of the following is correct? a)the header file is correct as given. b)the definition of max_balance should be removed since header files should not contain constants. c)the definition of cashregister should be removed since header files should not contain class definitions. d)the body of the get_monthly_balance function should be added to the header file.
Answers: 1
![image](/tpl/images/cats/informatica.png)
Computers and Technology, 22.06.2019 20:00, bowmanari2154
What is used to analyze and summarize your data without graphical support
Answers: 1
![image](/tpl/images/cats/informatica.png)
![image](/tpl/images/cats/informatica.png)
Computers and Technology, 23.06.2019 21:50, Trinhphuongtran
Description: write function lastfirst() that takes one argument—a list of strings of the format "lastname, firstname" —and returns a list consisting of two lists: (a) a list of all the last names (b) a list of all the first names
Answers: 2
You know the right answer?
In the linked-list based bag implementation, we demonstrated the functionalities, such as, add, remo...
Questions in other subjects:
![Konu](/tpl/images/cats/istoriya.png)
History, 19.01.2021 14:00
![Konu](/tpl/images/cats/mat.png)
Mathematics, 19.01.2021 14:00
![Konu](/tpl/images/cats/en.png)
![Konu](/tpl/images/cats/mat.png)
Mathematics, 19.01.2021 14:00
![Konu](/tpl/images/cats/geografiya.png)
Geography, 19.01.2021 14:00
![Konu](/tpl/images/cats/obshestvoznanie.png)
Social Studies, 19.01.2021 14:00
![Konu](/tpl/images/cats/mat.png)
Mathematics, 19.01.2021 14:00
![Konu](/tpl/images/cats/mat.png)
Mathematics, 19.01.2021 14:00
![Konu](/tpl/images/cats/mat.png)
Mathematics, 19.01.2021 14:00