作者benck (小伦)
看板NTU-Exam
标题[试题] 97下 陈俊良 物件导向程式设计 期末考
时间Mon Jun 15 11:17:32 2009
课程名称︰物件导向程式设计
课程性质︰系定必修
课程教师︰陈俊良
开课学院:电资学院
开课系所︰资讯工程学系
考试日期(年月日)︰2009/6/15 10:00~12:00
考试时限(分钟):120分钟
是否需发放奖励金:是
试题 :
Examination of Object-Oriented Programming
2009/06/15, NTUCS&IE
1. As we know, abstract classes cannot be instantiated. Can abstract classes
have constructors? Explain your reason briefly (at most 5 lines).
[5%+10%]
2. A way to create a thread is to declare a new class, say
MyThread, that
extends class
Thread.
Class
MyThread then overrides the
run() method. For example,
class MyThread extends Thread {
public void run() {
// the code of the new thread
}
}
The following code would then create a thread and start it running.
new MyThread().start();
If you forget to override the
run() method, what will happen?
Explain your reason briefly (at most 5 lines).
[5%+10%]
3. Is it possible that, at a time, one thread invokes a synchronized method
while the other thread invokes another synchronized method of the same
class? Explain your reason briefly (at most 5 lines).
[5%+10%]
4. Please describe the exception handling mechanism of Java (at most 10 lines).
[15%]
5. Please describe the operation of event-listener programming model
(at most 10 lines).
[15%]
6. Please describe the concept of object-oriented programming in detail
(no line limitation).
[25%]
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 123.204.86.9
1F:推 chopssin :喔手脚真快XD想必您也提早交卷 06/15 12:03