Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Modified Bin Manager Class Modify the BinManager class you wrote for Programming Challenge 14 in Chapter 8 to overload its getQuantity, addParts, and removeParts functions

Modified Bin Manager Class Modify the BinManager class you wrote for Programming Challenge 14 in Chapter 8 to overload its getQuantity, addParts, and removeParts functions as shown here:

These new functions allow parts to be added, parts to be removed, and the quantity in stock for a particular item to be retrieved by using an item description, rather than a bin number, as an argument. In addition to writing the three overloaded functions, you will need to create a private BinManager class function that uses the item description as a search key to locate the index of the desired bin.

Test the new class functions with the same client program you wrote for Programming Challenge 14 in Chapter 8, modifying it to call the new functions. Be sure to use some descriptions that match bins in the array and some that do not.

As you did in the previous Bin Manager program, if an add or remove operation is successfully carried out, make the function return true. If it cannot be donefor example, because the string passed to it does not match any item description in the arraymake the function return false. If the getQuantity function cannot locate any item whose description matches the one passed to it, make it return 1.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

The Core Ios Developer S Cookbook Core Recipes For Programmers

Authors: Erica Sadun ,Rich Wardwell

5th Edition

0321948106, 978-0321948106

More Books

Students also viewed these Programming questions

Question

Describe when financial information is a faithful representation. .

Answered: 1 week ago

Question

Why do ethers typically have lower boiling points than alcohols?

Answered: 1 week ago

Question

Explain Risk and Return

Answered: 1 week ago