セクション 4. 章 2
single
Challenge: Compose a Computer Class
メニューを表示するにはスワイプしてください
タスク
スワイプしてコーディングを開始
Practice composition by building a Computer class that contains other component classes. In this task, you will implement a Computer class that holds references to CPU, RAM, and Storage objects as its fields.
- Add fields to the
Computerclass forCPU,RAM, andStorage. - Implement a constructor for
Computerthat takesCPU,RAM, andStorageobjects as parameters and assigns them to the corresponding fields. - Add a method
GetSpecs()to theComputerclass that returns a string combining the results of callingGetInfo()on each component.
解答
すべて明確でしたか?
フィードバックありがとうございます!
セクション 4. 章 2
single
AIに質問する
AIに質問する
何でも質問するか、提案された質問の1つを試してチャットを始めてください