1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
vekshin1
2 years ago
5

Design and write an object-oriented program for managing inventory bins in a warehouse. To do this you will use two classes: Inv

Bin and BinManager. The InvBin class holds information about a single bin. The BinManager class will own and manage an array of InvBin objects. Here is a skeleton of what the InvBin and BinManager class declarations should look like:
class InvBin

{

private:

string description;

int qty;

public:

InvBin (string d = "empty", int q = 0)

{

description = d;

qty = q;

}

void setDescription(string d);

string getDescription() ;

void setQty(int q);

int getQty( ) ;

};



class BinManager

{

private:

InvBin bin[30];

int numBins;

public:

BinManager()

{

numBins = 0;

}

BinManager(int size, string d[], int q[])

{

}

string getDescription(int index);

int getQuantity(int index);

string displayAllBins();

bool addParts(int binIndex, int q);

bool removeParts(int binIndex, int q);

};
Computers and Technology
1 answer:
andrew11 [14]2 years ago
3 0

Answer:

#include <cstdlib>

#include <iostream>

using namespace std;

int main(int argc, char *argv[])

{

class InvBin {

private:

string description;

int qty;

 

public:

InvBin(){ description = ""; qty = 0;}

InvBin (string d, int q) { description = d; qty = q;}

void setDescription (string d){description = d;}

void setQty(int q){qty = q;}

string getDescription() {return description;}

int getQty(){ return qty; }

};

class BinManager {

private:

InvBin bin[30];

int numBins;

 

public:

BinManager() {numBins=0;}

BinManager(int size, string d[], int q[])

{

int i;

for(i=0; i<size; ++i)

{

bin[i].setDescription(d[i]);

bin[i].setQty(q[i]);

}

numBins = size;

}

void setDescription (int b, string d) {bin[b].setDescription(d); }

void setQty(int b, int q) { bin[b].setQty(q); }

string getDescription(int b) { return bin[b].getDescription();}

int getQty(int b) { return bin[b].getQty();}

bool addParts(int b, int q)

{

int temp;

if(q < 1)

return false;

else

{

temp = bin[b].getQty() + q;

bin[b].setQty(temp);

return true;

}

}

bool removeParts(int b, int q)

{

int temp;

if (q < 1 || bin[b].getQty() < q)

return false;

else

{

temp = bin[b].getQty() - q;

bin[b].setQty(temp);

return true;

}

string displayAllBins()

{

int i;

for(i=0;i<numBins;++i)

cout << i+1 << ". " << left<< setw(20) << bin[i].getDescription()

<< right << setw(4) << bin[i].getQty() << endl;

}

};

system("PAUSE");

return EXIT_SUCCESS;

}

Explanation:

You might be interested in
What is the answer for 2.8.10 word games? This is what I have so far, but I can’t seem to be able to figure out the bananaSplit
Feliz [49]

Answer:

 public String bananaSplit(int insertIdx, String insertText) {

     return word.substring(0, insertIdx) + insertText + word.substring(insertIdx);

 }

Explanation:

Do you have the other parts of the WordGames class?

8 0
2 years ago
A state university locks in costs for a student once a student starts attending the university. The total cost is $24,500. A stu
zlopas [31]
10,700+5000+1600=17,300
24,500-17,300=7,200
7,200/10=
$720.00 will need to be saved every month.
6 0
3 years ago
Read 2 more answers
What should software firm design for the VR sample at Museum?
gladu [14]

The software firm design for the VR sample at Museum is a 360-degree video that shows a walk through of the virtual studio of a famous artist that is aided by a narration about the various piece of art that the user wants to focus on.

<h3>How is VR used in museums?</h3>

VR is known to be a technology that puts the user inside the experience they are viewing. It is known to be a kind of  interactive or it is one that take the shape of 360-degree video.

The use of VR is done so as to form or create museum tours, so that exhibits in the museum can be interactive, and to bring the different scenes to reality.

Learn more about museums from

brainly.com/question/95815

5 0
2 years ago
Patient letters created from __________ use structured data and do not require a large amount of typing from the medical assista
sladkih [1.3K]
Patient letters created from __________ use structured data and do not require a large amount of typing from the medical assistant.
TEMPLATES
5 0
3 years ago
Read 2 more answers
In a doubly linked chain implementation of a queue, what is the performance when the dequeue operation
RUDIKE [14]

Answer:A) O(1)

Explanation:Double linked chain is the type of the data structures that are linked with each other .There are the components that contain the set of records in a queue manner and forms the links which are referred as the nodes.

The operation performed by the dequeue operator is of  eliminating the element which is at the front. So, when the operation of the dequeue operation gets invoked then the functioning of initializing of new dequeue and removing the front value by O(1) method.

5 0
2 years ago
Other questions:
  • Raeball was a lovin doll. And she spoke her mind as she stood tall. She made you special and loved. You're missed by so many. An
    10·2 answers
  • Which of these statements is true? Steve Jobs invented the mouse as an input device. Bill Gates invented the mouse as an input d
    6·1 answer
  • Create a function named first_a that uses a list comprehension. The function will take a single integer parameter n. Find every
    13·1 answer
  • Line spacing refers to the amount of space between each line in a paragraph. A. True B. False
    14·2 answers
  • Data types influence the following in the workflow: (Select all that apply)a. the color choices and layout decisions around comp
    15·2 answers
  • For some reason, Danica's classmate George could not find the registered symbol in the symbol gallery. He is selling
    14·1 answer
  • Excel spread sheets are primarily used to
    13·2 answers
  • Complete the following sentence.
    7·1 answer
  • Create a PHP page that contains an array of at least 20 movie titles or book titles (your choice). The HTML page should have an
    7·1 answer
  • One of the primary principles of the Rapid Application Development methodology is early prototyping of the _______ in the develo
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!