セクション 1. 章 2
single
Challenge: Create a Book Class
メニューを表示するにはスワイプしてください
タスク
スワイプしてコーディングを開始
Practice creating a class with both a default and a parameterized constructor. Your goal is to implement a Book class that can be initialized with or without specifying the title and author.
- The class must have two public string fields:
TitleandAuthor. - The default constructor must set both
TitleandAuthorfields to"Unknown". - The parameterized constructor must accept two string parameters and assign them to the
TitleandAuthorfields, respectively. - Creating a
Bookwithout parameters must initialize it with"Unknown"values. - Creating a
Bookwith parameters must initialize it with the provided values.
解答
すべて明確でしたか?
フィードバックありがとうございます!
セクション 1. 章 2
single
AIに質問する
AIに質問する
何でも質問するか、提案された質問の1つを試してチャットを始めてください