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
3 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]3 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
Which expression is equivalent to the given expression?
RoseWind [281]

Answer:

A

Step-by-step explanation:

yes it is A

even though the answer is not here

7 0
3 years ago
The radioactive isotope radium has a half-life of 1,600 years. The mass of a 100-gram sample of radium will be______ grams after
Olenka [21]
To solve this we are going to use the half life equation N(t)=N_{0} e^{( \frac{-0.693t}{t _{1/2} }) }
Where:
N_{0} is the initial sample
t is the time in years
t_{1/2} is the half life of the substance
N(t) is the remainder quantity after t years 

From the problem we know that:
N_{0} =100
t=200
t_{1/2} =1600

Lets replace those values in our equation to find N(t):
N(200) =100e^{( \frac{(-0.693)(200)}{1600}) }
N(200)=100e^{( \frac{-138.6}{1600} )}
N(200)=100e^{-0.086625}
N(200)=91.7

We can conclude that after 1600 years of radioactive decay, the mass of the 100-gram sample will be 91.7 grams.

8 0
3 years ago
Tabby read 254 pages in 8 days. What is her unit rate in pages per day?
Agata [3.3K]

Answer:

31.75 round it off to 32 pages per day

Step-by-step explanation:

254/8=31.75 but you cant but a decimal so its 32

5 0
3 years ago
What is the diagonal of a 16×12 inch tv
mamaluj [8]

Answer:

the diagonal of TV equal to 20

5 0
3 years ago
Find the vertex form of: y=2x^2-5x+13
Ket [755]
The vertex form of a quadratic function is:

 f(x) = a(x - h)² + k

The coordinate (h, k) represents a parabola's vertex.

In order to convert a quadratic function in standard form to the vertex form, we can complete the square.

y = 2x² - 5x + 13

Move the constant, 13, to the other side of the equation by subtracting it from both sides of the equation.

y - 13 = 2x² - 5x

Factor out 2 on the right side of the equation.

y - 13 = 2(x² - 2.5x)

Add (b/2)² to both sides of the equation, but remember that since we factored 2 out on the right side of the equation we have to multiply (b/2)² by 2 again on the left side.

y - 13 + 2(2.5/2)² = 2(x² - 2.5x + (2.5/2)²)

y - 13 + 3.125 = 2(x² - 2.5x + 1.5625)

Add the constants on the left and factor the expression on the right to a perfect square.

y - 9.875 = 2(x - 1.25)²

Now, we need y to be by itself again so add 9.875 back to both sides of the equation to move it back to the right side.

y = 2(x - 1.25)² + 9.875

Vertex: (1.25, 9.875)

Solution: y = 2(x - 1.25)² + 9.875

Or if you prefer fractions

y = 2(x - 5/4)² + 79/8
7 0
3 years ago
Other questions:
  • Find the product of 5^56 x 5^22 x 5^-96
    14·1 answer
  • Find Y pls<br> Thank you
    14·2 answers
  • Carlos deposited $28.50 into his bank account after making a $20.00 withdrawl to pay for some school supplies.Represent these si
    11·1 answer
  • Can anyone help me with the question I attached below?
    9·1 answer
  • What is 82 minus 63.9
    13·2 answers
  • You have a certain number of books in your library. You bought more books to triple your amount, then decide to give 14 away to
    12·1 answer
  • What is the solution to y = 3x + 2 for the replacement set x = {1.1}?
    9·1 answer
  • A rectangle is 6 centimeters long and 4 centimeters wide. What is the area of the rectangle?
    15·2 answers
  • How do you do this problem?
    13·1 answer
  • A baker wants to put 3 3/4 pounds of apples in each pie she makes. She purchased 52 1/2 pounds of apples. How many pies can she
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!