This commit is contained in:
2026-10-20 16:38:29 +09:00
parent 6a268bdb79
commit 64d90f1da5
30 changed files with 713 additions and 0 deletions

27
CUI_EM_OOP/src/Book.java Normal file
View File

@@ -0,0 +1,27 @@
public class Book {
String title;
String author;
int price;
public Book() {
this.title = "タイトル未設定";
this.author = "著者未設定";
this.price = 0;
}
public Book(String title, String author, int price) {
this.title = title;
this.author = author;
this.price = price;
}
public void output() {
System.out.println(this.title);
System.out.println(this.author);
System.out.println(this.price);
}
}