2009年6月24日 星期三

LAB18 4/27 Class Definition3

Do Display 4.7 (3rd, 2nd ed.) or 4.5 (1st ed.). Then use Display 4.8 to call 4.7.

Question
In Display 4.7, if the method setDate has the parameter as setDate(int month, int day, int year), what kind of changes should be made in its body of codes?


程式畫面 Display 4.7
上圖是Display4.7


程式畫面 修改Display 4.7的部分

Display 4.8使用到setDate(int,int,int)
這個方法,所以必須在Display 4.7的class 定義中,加入setDate方法的定義。
也就是藍色方框框住的部分。

程式畫面 Display 4.8

沒有留言:

張貼留言