10/14 開発課題

This commit is contained in:
2026-10-14 16:37:20 +09:00
parent 79fb30d941
commit 2b4e19fae2
8 changed files with 239 additions and 0 deletions

15
Item.java Normal file
View File

@@ -0,0 +1,15 @@
package misson1014;
public class Item {
String name;
int price;
int stock;
void sell(int amount) {
this.stock = this.stock - amount;
}
int totalPrice() {
return this.price * this.stock;
}
}