0% found this document useful (0 votes)
42 views3 pages

Exercise Topic 1

This document contains questions about object-oriented programming concepts. It asks the student to define object-oriented programming, identify advantages of OOP such as code reusability and representing real world situations, explain terms like object, class, encapsulation, data abstraction, inheritance, and polymorphism. It also contains true/false questions testing understanding of concepts like objects consisting of data and methods, and inheritance allowing a subclass to have the same abilities as the base class.

Uploaded by

F3031
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
42 views3 pages

Exercise Topic 1

This document contains questions about object-oriented programming concepts. It asks the student to define object-oriented programming, identify advantages of OOP such as code reusability and representing real world situations, explain terms like object, class, encapsulation, data abstraction, inheritance, and polymorphism. It also contains true/false questions testing understanding of concepts like objects consisting of data and methods, and inheritance allowing a subclass to have the same abilities as the base class.

Uploaded by

F3031
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

F3031 OBJECT-ORIENTED PROGRAMMING JULAI2010

TOPIC 1 Introduction To Object-Oriented Programming

Name :______________________________________________

Class :_______________________________________________

Reg. No: _____________________________________________

1) Define Object Oriented Programming. [5M]

_____________________________________________________________________________________
_____________________________________________________________________________________
_____________________________________________________________________________________
_____________________________________________________________________________________
_____________________________________________________________________________________

2) Choose the correct explanation for advantages of object-oriented programming below. [8 M]

Code extensibility Existing code can be tested


before it is inherited from
previous module

Ability to add codes which are


Code reusability already existing and
consistent with, needs

Using object oriented


concept, it will assist the
Represent real world programmer in creating a
module because data used
represents real situations.

The use of encapsulation


Data security
concept has made data to be
protected from misuse by an
unauthorized person
F3031 OBJECT-ORIENTED PROGRAMMING JULAI2010

3) Choose the correct explanation for the term below. [12 M]

Object Is the term used to explain


many things. Consists of data
and method.

Is a process to delete all


Classes unnecessary attributes and
remain the necessary
attributes to describe an
object.

Encapsulation
A set of objects that have
similar attributes and method

Process of tying together all


Data abstraction
data and methods that form a
class and control the access to
data by hiding its information
Inheritance
Giving the same message to
two or more different objects
Poliymorphism and produce different
behaviours depending on how
the objects receive the
message

Create a new class from an


existing class together with
new attributes and
behaviours
F3031 OBJECT-ORIENTED PROGRAMMING JULAI2010

This section contains 5 questions. State TRUE or FALSE. [5 M]

1. Behaviors is a characteristics, which can be seen [TRUE/FALSE]

2. Attributes is an actions that are done to an object [TRUE/FALSE]

3. An object consist of data and method [TRUE/FALSE]

4. Encapsulation is a process of tying together all function by hiding its information


[TRUE/FALSE]

5. In inheritance the new class have the same ability as the base class
[TRUE/FALSE]

You might also like