Question: Help me with this c++ question: Class Carrier Private Data: Carrier name. a boolean member named init. An STL map object (named account_list or account_map)

Help me with this c++ question:

Class Carrier

  • Private Data:
    • Carrier name.
    • a boolean member named init.
    • An STL map object (named account_list or account_map) whose keys are phone numbers (string) and whose values are STL vectors of pointers to Message objects.
    • Public Static constant data: default value for Carrier name ("XYZ Wireless"), the default value for init (false).
    • Default constructor/Non default constructor. NOTE: account_list is an object of STL map. There is no need to "initialize" it in constructors. It should be properly "initialized" to an empty map object when a SmartCarrier object is instantiated.
    • Destructor: for all accounts de-allocate memory used by their vector of pointers to Message to avoid memory leak. Additionally you must clear all elements in each vector and at the end clear all entries in the map.
    • No accessor/mutator is required.

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!