Question: not sure why there is an error Current file: ItemToPurchase.java ` ` ` public void setPrice ( int price ) { itemPrice = price; }

not sure why there is an error Current file:
ItemToPurchase.java
```
public void setPrice(int price){
itemPrice = price;
}
public int getPrice(){
return itemPrice;
}
public void setQuantity(int quantity){
itemQuantity = quantity;
}
public int getQuantity(){
return itemQuantity;
}
```
Run your program as often as you'd like, before submitting for grading. Below, type any needed input values in the first box, then click Run program and observe the program's output in the second box.
Enter program input (optional)
```
chocolate
3
1
```
not sure why there is an error Current file:

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 Programming Questions!