1日目3段階目完了しました。
This commit is contained in:
11
em-oop/src/Item.java
Normal file
11
em-oop/src/Item.java
Normal file
@@ -0,0 +1,11 @@
|
||||
|
||||
public class Item {
|
||||
//
|
||||
String name;
|
||||
int price;
|
||||
int stock;
|
||||
//
|
||||
void sell(int amount) {
|
||||
this.stock = this.stock - amount;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user