Description
1.2 Barrell of Monkeys (dynamic array example)
Barren of Monkeys
This is an example of a Dynamic Array You will be expected to create a Barrell class which will he a container of Monkey objet.. The container class Barrel) will use a Dynamic Array of Monkey
-observer observe
EMI
Bane1117
earrewongnal ors Baum.
..errettl
……(orlOnal coral Barra. Boma
Hnserfinewmontey mown…v.. void .0.emoveAperger Mort., MI
Noticethat the Monkey class contains a private member variable of type Observer. Observer is not defined a lh Ufa diagrams. You are provided an Observe. file. You just need. do.o things to satisfy this member variable:
f include “observer .6”; // in monkey,
a. at the top of Mairtcp define the following two global variables
…server nouriconstructions – 0; dub:woe… ummuestructions – Of
You are provided Monkey.b, Barrelth, and Main.cpp. However, in future projects the HMI_ diagrams should be sufficient for youta also wale the .M1 files.
There are a series of Unit TeMsto fully.. the Barrell class.
The Dynamic Array of Monkeys MOST begin with a capacity ofjust 2. When you ‘grow.. array, double its current capacity So !twill start with a capacity of 2 and then grow, as needed,to.tben to B, then to 16, etc_