12/01/2013

BCS2233 OOP: Quiz 3

Name:_______________________
Matric:_______________________
Course:_______________________


A. TRUE/ FALSE (5 Marks)

1. You can derive a new class from an existing class. This is called  as class inheritance. (T/F)
2. The new class (derived class ) is called a superclass. The existing class is called child class.(T/F)
3. Constructors are a special kind of methods that are invoked to construct objects(T/F)
4. To override a method, the method must be defined in the derived class  using the same signature as in its existing class.(T/F)
5. All method including  a private method can be overridden.(T/F)

B. Design a class named person and its two subclasses named student and employee. A person has a name, address, phone, and email address. A student has a status. An employee has an department, salary and date hired.

Draw the UML diagram for the classes.

(10 Marks)


* untuk soalan B. 1. Bina Class (tak perlu buat program penuh) 2. Lukis UML.

pls submit before 5:00 pm.

No comments:

Cara download Installer windows 10 dalam format ISO

1. Jika anda bercadang untuk download windows 10 melalui website rasmi windows - pilihan untuk download dalam format ISO tidak di berikan.  ...