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
A spreadsheet contains the maximum weight and maximum height for fifty dog breeds. The breeds are located in rows, and the weigh
MrRa [10]

Answer:

a. Locate

Explanation:

Question options (obtained on the net):

a. Locate

b. Sort

c. Filter

d. Replace

Explanation:

The largest value of the weights of the dog breed in row 43 is the maximum weight of the dog breed in the row

The 'MAX' formula or the 'Autosum' tool can be used to give the largest value in a row, or column

To locate the maximum value in MS Excel, the ADDRESS and MATCH and MAX functions are combined and entered into the blank cell on the right, specifying the same range for the MAX and MATCH functions, and a '0' for the MATCH function as well as a '1' for the ADDRESS function as follows;

=ADDRESS(MATCH(MAX(A1:E1), A1:E1, 0), 1)

Therefore, to navigate to the maximum weight, Emily should use a <em>locate</em>(ing) tool navigate to the information on the spread sheet

8 0
2 years ago
The incompatibilities in speed between the various devices and the CPU make I/O synchronization difficult, especially if there a
Iteru [2.4K]

Answer:

In a buffer

Explanation:

We can define a buffer as a temporary holding area for data between the various devices and the CPU make I/O synchronization especially if there are multiple devices attempting to do I/O at the same time.

Items stored at the buffer helps to reduce the The incompatibilities in speed between the various devices and the CPU.

3 0
3 years ago
You have a notebook computer and wish to connect to an IEEE 802.11n wireless network. The computer does not have a built-in wire
Ira Lisetskai [31]

Answer:

The wireless adapter to use is the Wireless USB 2.0 Extender

Explanation:

The Wireless USB 2.0 Extender is a USB component that enables a computer to connect to and communicate with other computers on a network, or even to connect to the internet.

It uses an IEEE 802.11g radio platform and communicates within a radio frequency range of 2.4GHz.

Therefore, in cases where a notebook computer does not have a built-in wireless LAN card or PC card interface, you can use the Wireless USB 2.0 Extender as the best solution to that problem.

3 0
2 years ago
How can an individual find career data?
kolezko [41]
How can an individual find career data?a. using a libraryb. searching the webc. conducting an interview with someone in a particular fieldd. all answer choices are sources for finding career data?The answer is d. An individual can do all the option a, b, and c to find a better career data.
6 0
3 years ago
We initialize the parameters to all zero values and run the linear perceptron algorithm through these points in a particular ord
Usimov [2.4K]

The main aim of running the parameters in the linear perceptron algorithm is to be able to develop a machine learning algorithm for binary classification tasks.

<h3>What is a linear perceptron algorithm?</h3>

This refers to the linear classification algorithm that is used in machine learning.

This is done in order to learn a decision boundary that divides different classes using a hyperplane.

Hence, we can see that your question is incomplete because the parameters are not included, hence a general overview was given to give you a better understanding of the concept.

Read more about machine learning here:

brainly.com/question/25523571

#SPJ1

7 0
2 years ago
Other questions:
  • Students recently created a Gaming Club at their school. On Friday of every week, students bring in their gaming consoles (Xbox,
    10·1 answer
  • Is this photo considered rim photography
    11·1 answer
  • The two types of objects responsible for collecting data are
    14·1 answer
  • Can Any body Define what is search engine in a simple language quick please​
    14·1 answer
  • Populate a one-dimensional array with the following grades in this order: 90, 61, 74, 42, 83, 51, 71, 83, 98, 87, 94, 68, 44, an
    15·1 answer
  • Discuss the difference between a broad internet search and a narrow internet search?
    12·2 answers
  • Consider the program below: public class Test { public static void main( String[] args ) { int[] a; a = new int[ 10 ]; for ( int
    5·1 answer
  • BitTorrent, a P2P protocol for file distribution, depends on a centralized resource allocation mechanism through which peers are
    8·1 answer
  • JAVA
    5·1 answer
  • List three features of the third generation of computers
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!