Java程序辅导

C C++ Java Python Processing编程在线培训 程序编写 软件开发 视频讲解

客服在线QQ:2653320439 微信:ittutor Email:itutor@qq.com
wx: cjtutor
QQ: 2653320439

These exercises teach one of the most important aspects of OOP, which is the idea of getting other objects to do some work for you. Rather than altering the source code (as we did with BankAccount) we are going to see how to use existing classes as part of a new class.

First download the source code for . Open the class with the BlueJ editor and select the Documentation view option (instead of Source Code) to read its documentation.

Create a 400x400 SimpleCanvas object, and notice that it causes a "drawing window" to appear on the screen. The methods of the SimpleCanvas provide you with an easy way to produce graphical output.

Optional Hot Section

This section contains further optional work for interested students who do not need to do this work, but obviously it will be beneficial. While many of the exam questions come directly from lab exercises, none of them will come from the hot sections (unless the material subsequently appears in the regular sections of later lab sessions).