Question: Hi, can you help me with this C++ programming question? Will rate. Thanks! C+Programming Question The class PackageManagement is used to keep track of the

Hi, can you help me with this C++ programming question? Will rate. Thanks!Hi, can you help me with this C++ programming question? Will rate.

C+Programming Question The class PackageManagement is used to keep track of the packages of the package-delivery companies of the previous questions. It is defined with an array of pointer variables of type Package, the maximum number of packages that the company can handle, and the actual number of packages being handled class PackageManagement [ public: PackageManagement () PackageManagement (); bool addPackage (const Package*); bool removePackage (int packageID); void listPackages ) const; bool searchPackge (int packageID) const; private: Package* packages; int maxNumOfPackages; int numberOfPackages; a) Provide the implementation for: [7 marks] bool PackageManagement: :addPackage (const Package); This function adds a package to the end of the array packages and increments numberOfPackages. The data should only be added, if the package is not already in the list and if the number of packages is less than or equal to the maximum number of packages. Return false otherwise. b) Provide the implementation for: [8 marks] bool PackageManagement: : removePackage (const Package); This function decrements numberOfPackages and removes the data record of the package with corresponding id from packages by shifting the array from right to left. If the package does not exist, the function returns false

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!