Question: In the Store class, complete the public method definition for setNumSold ( ) with the integer parameter customNumSold. Ex: If the input is 2 3

In the Store class, complete the public method definition for setNumSold() with the integer parameter customNumSold.
Ex: If the input is 23195, then the output is:
Items in stock: 231
Number of items sold: 95
public class Store {
private int numStock;
private int numSold;
public void setNumStock(int customNumStock){
numStock = customNumStock;
}
/* Your code goes here */{
numSold = customNumSold;
}
public int getNumStock(){
return numStock;
}
public int getNumSold(){
return numSold;
}
}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!