<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>
Answer:
y = -3x - 16
Step-by-step explanation:
Point-slope form: y - y1 = m(x - x1)
Given: y - 2 = -3(x + 6)
Slope-intercept form: y = mx + b
To write the equation in slope-intercept form, we need to know the slope(m) and the y-intercept(b). By looking at the given equation, we can see that the slope is -3. We are also given the value of one point: (-6, 2).
To find the y-intercept, input the given values of the slope and the point into the equation format and solve for b:
y = mx + b
2 = -3(-6) + b
2 = 18 + b
Subtract 18 from both sides of the equation to isolate b:
2 - 18 = 18 - 18 + b
-16 = b
The y-intercept is -16.
Now that we know the slope and the y-intercept, we can write the equation:
y = -3x - 16
h(x) = 5 - 9x
h(8) = 5 - 9×8 ( putting value x = 8)
h(8) = 5 - 72
h(8) = -67
Answer is -67.
Answer:
gdgshssshsjsb so ddbshshshwgevbd sbshsgsgys jsjshshshshdhdhdhhdhehdhehehdhjddhdjdjdj Shandy's ddbshshshwgevbd