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
muminat
4 years ago
5

Write a unit test for addinventory(). call redsweater.addinventory() with parameter sweatershipment. print the shown error if th

e subsequent quantity is incorrect. sample output for failed unit test given initial quantity is 10 and sweatershipment is 50: beginning tests. unit test failed: addinventory() tests complete. note: unit test failed is preceded by 3 spaces.
Mathematics
1 answer:
Katena32 [7]4 years ago
5 0
<span>#include <iostream> using namespace std; class InventoryTag { public: InventoryTag(); int getQuantityRemaining() const; void addInventory(int numItems); private: int quantityRemaining; }; InventoryTag::InventoryTag() { quantityRemaining = 0; } int InventoryTag::getQuantityRemaining() const { return quantityRemaining; } void InventoryTag::addInventory(int numItems) { if (numItems > 10) { quantityRemaining = quantityRemaining + numItems; } } int main() { InventoryTag redSweater; int sweaterShipment = 0; int sweaterInventoryBefore = 0; sweaterInventoryBefore = redSweater.getQuantityRemaining(); sweaterShipment = 25; cout << "Beginning tests." << endl; // FIXME add unit test for addInventory /* Your solution goes here */ cout << "Tests complete." << endl; return 0; }</span>
You might be interested in
Due tomorrow i will like!
arsen [322]
His weekly allowance is 14$
8 0
3 years ago
A classroom has stadium seating. There are 10 seats in the first row, 13 seats in the second row, 16 seats in the third row and
Nikolay [14]
The right answer is “The classroom has 5,180 seats “
3 0
3 years ago
Given the polynomial 2x3 + 18x2 − 18x − 162, what is the value of the coefficient 'k' in the factored form?2x3 + 18x2 − 18x − 16
s344n2d4d5 [400]

Answer:

k=3

Step-by-step explanation:

Let

f(x)=2x^3+18x^2-18x-162

We factor 2 to obtain;

f(x)=2(x^3+9x^2-9x-81)

We factor the polynomial within the parenthesis by grouping.

f(x)=2(x^2(x+9)-9(x+9)

f(x)=2(x^2-9)(x+9)

f(x)=2(x^2-3^2)(x+9)

We apply difference of two squares on the second factor: x^2-3^2=(x-3)(x+3)

f(x)=2(x+3)(x-3)(x+9)

We now compare to;

f(x)=2(x+k)(x-k)(x+9)

It is now obvious that k=3

6 0
3 years ago
Help me solve this please
Anna71 [15]
27+ 2/5×-1/2 = 27 - 1/5
(135 - 1)/5 = 134 /5 <——answer
8 0
3 years ago
Slope intercepts <br> No links, Will mark BRAINLIEST
Sergeeva-Olga [200]

Answer:

<em><u>Lines are perpendicular to each other .</u></em>

Step-by-step explanation:

Standard equation  of line is : y = mx + c, Where m represents the slope

Given Equations :

y = -5x + 1\\\\Slope , m_1 = -5

y = \frac{1}{5}x +1\\\\Slope, m_2 = \frac{1}{5}

Two lines are parallel if the slope of the lines are same.

Two line are perpendicular if the product of the slope = - 1

Clearly slopes are not equal , therefore the lines are not parallel.

           product of the slope is - 1, therefore the lines are perpendicular.  

                                m_1 \times m_2 = -5 \times \frac{1}{5} = - 1

8 0
3 years ago
Other questions:
  • For several months, a shoe store owner collects data on the number of children in a group (c) and the total amount of the purcha
    6·1 answer
  • Diana invested $3000 in a savings account for 3 years. She earned $450 in interest over that time period. What interest rate did
    6·2 answers
  • 132÷8 by placing the first digit
    14·1 answer
  • Which list shows the following numbers in order from least to greatest?
    7·1 answer
  • By what factor must you multiply a number in order to double its square root? With an example.
    14·1 answer
  • The volume of the above solid is?
    11·1 answer
  • When Hana goes to the mall, she always buys the same lunch and also buys some books. The table shows the number of books she buy
    11·2 answers
  • Write an equation of the line passing though the point (4,3) that is parallel to the line y= 6x-3
    12·1 answer
  • Work out
    7·1 answer
  • Eli is following this recipe to bake bread rolls.He uses 900 g of flour.How much of the other ingredients does he use?Recipe: Ma
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!