Question: I worked the problem but I am having trouble with the vector of barges. Could you please explain step by step how you arrive at

I worked the problem but I am having trouble with the vector of barges. Could you please explain step by step how you arrive at the solution. I want to understand this!

Part 2: The next class is called Barge, which contains the data a private data member of type vector a private data member of type string called name. Each barge has the following methods. A public constructor that has the name of the barge as a string. The constructor will assign the name of the barge to the data member, such as this->name=newName; A public member function called LoadFirework that takes a Firework * pointer as a parameter. o Inside this function, the Firework pointer is added to the barge. What you need to remember is that a vector of Firework Pointers can contain fireworks, rockets, or flowers. A public member function called Ignite(). o Ignite reports the name of the barge to the screen. The output would be "Barge "<name<<" sets off its display!" o The Ignite function traverses the vector of firework pointers with a temp variable. The firework will then explode, that is, temp->Explode();

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 Programming Questions!