3日分のミッション課題です。

This commit is contained in:
2026-09-24 15:27:32 +09:00
parent ff69e07219
commit 41334b8584
10 changed files with 458 additions and 63 deletions

View File

@@ -2,25 +2,27 @@
public class BasicCheck1 {
public static void main(String[] args) {
// TODO 自動生成されたメソッド・スタブ
Book book = new Book();
//1-1
// Book book = new Book();
// book.title = "吾輩は猫である";
// book.author = "夏目漱石";
// book.price = 800;
//
// System.out.println(book.title);
// System.out.println(book.author);
// System.out.println(book.price);
book.title = "タイトル未設定";
book.author = "著者未設定";
book.price = 0;
//1-1
System.out.println(book.title);
System.out.println(book.author);
System.out.println(book.price);
//2-1
Book book1 = new Book();
System.out.println(book1.title);
System.out.println(book1.author);
System.out.println(book1.price);
Book book2 = new Book("銀河鉄道の夜","宮沢賢治",500);
Book book2 = new Book("銀河鉄道の夜", "宮沢賢治", 500);
System.out.println(book2.title);
System.out.println(book2.author);
System.out.println(book2.price);
//2-1
}
}