Quantcast
Channel: MEPO Forum - 程式設計
Viewing all articles
Browse latest Browse all 99

TQC+ JAVA6 物件導向程式語言 - 602:電腦零件設計 (no replies)

$
0
0
題目一:

原始檔:



結果檔:






執行結果


class Computer 是為了配合「題目四」中
「題目一定義的Note」及「題目二定義的PCUnit」要有公共繼承的父類別而設定的

題目二:


原始檔:



結果檔:




執行結果





題目三:

原始檔:



結果檔:



執行結果




物件名.getClass():傳回「class + 物件型態名稱」
物件名稱.getClass().getName:傳回「物件型態名稱」



題目四:

原始檔:



結果檔:



執行結果





題目五:

原始檔:


結果檔:



執行結果

Viewing all articles
Browse latest Browse all 99

Trending Articles