0% found this document useful (0 votes)
411 views

Lab 1A: Introduction To Object Oriented Programming (Oop) : Duration: 2 Hours Learning Outcomes

This document provides details on a 2 hour lab session on introduction to object oriented programming (OOP). The learning outcomes are to illustrate the basic OOP terminology including classes, objects, encapsulation, data abstraction, inheritance, and polymorphism. The scenario describes a task to develop an examination system using Java for a college manager to demonstrate understanding of OOP concepts and terminology. The activities involve identifying classes and objects from diagrams, defining OOP concepts, listing advantages, and providing real-world examples.
Copyright
© © All Rights Reserved
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)
411 views

Lab 1A: Introduction To Object Oriented Programming (Oop) : Duration: 2 Hours Learning Outcomes

This document provides details on a 2 hour lab session on introduction to object oriented programming (OOP). The learning outcomes are to illustrate the basic OOP terminology including classes, objects, encapsulation, data abstraction, inheritance, and polymorphism. The scenario describes a task to develop an examination system using Java for a college manager to demonstrate understanding of OOP concepts and terminology. The activities involve identifying classes and objects from diagrams, defining OOP concepts, listing advantages, and providing real-world examples.
Copyright
© © All Rights Reserved
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/ 8

LAB 1A : INTRODUCTION TO OBJECT ORIENTED

PROGRAMMING (OOP)

Duration : 2 hours

Learning Outcomes

By the end of this practical session, you should be able to:


1. Illustrate the basic terminologies of OOP: Classes, Object,
Encapsulation, Data Abstraction, Inheritance and Polymorphism.

Hardware / software : Microsoft Word

SCENARIO:
Miss Lin, manager of IT department at Ipoh View College, wants a new
information system to support their current and future business operations.
Therefore, with the supervision of Miss Lin has given you the task to
develop examination system by using Java program. Your task is to
convince Miss Lin that you are familiar with Object Oriented Programming
concepts and terminologies before you proceed to develop examination
system.

Activity 1

Activity Outcome: Illustrate the basic terminologies of OOP: Classes

Procedure:
Step 1 : Based on below Student class figure, identify class, object and it
relationship with attributes and method.
Step 2 : Fill in the identification output in designated blank space.

1
Student 1. Class

• Name
• RegNum
• IC
• Tel Attribute/
2. data / properties
• Email
• Address
• Section

• InputData ()
• RegisterCourse ()
• InputMark () Operation
3. / behaviour / method
• DisplayInfo ()
• DisplayResult ()

Activity 2

Activity Outcome: Illustrate the basic terminologies of OOP: Object

Procedure:
Step 1 : Based on below StudInfo object from class Student, identify object
and it relationship with attributes and method.
Step 2 : Fill in the identification output in designated blank space.

2
StudInfo 1. An object

• Nurina Abdullah
• 01DDT15F1122
• 900123085643
• 012-6578343 2. Attribute
[email protected]
• Taman Cempaka
• DIS3A

• InputData()
• RegisterCourse() 3. Operation
• InputMark()
• DisplayInfo()
• DisplayResult()

Activity 3

Activity Outcome: Illustrate the basic terminologies of OOP: Classes and


Object

Procedure:
Step 1 : By using concept of class and object in OOP, illustrate Class
Course and Object MyCourse by including it relationship with attributes
and method.
Step 2 : Put both Class Course and Object MyCourse into figure diagram
as of Activity 1A and 1B.
Step 3 : Share and present the outcome of Class Course and Object
MyCourse.

3
Activity 4

Activity Outcome: Illustrate the basic terminologies of OOP: Encapsulation,


Inheritance and Polymorphism.

Procedure:
Step 1 : Identify 3 OOP terminologies based on figure
below Step 2 : Fill in the output in the blank space
provided below.

a.

4
b.

5
c.

6
Activity 5

Activity Outcome: Illustrate the basic terminologies of OOP: Encapsulation,


Data Abstraction, Inheritance and Polymorphism.

Procedure:
Step 1 : Define the 4 basic concept of OOP.
Step 2 : List down advantages of each concept
Step 3 : Give real example of each of the concept.
Step 4 : Fill in the output in the table provided below.

Real World
OOP Concept Definition Advantages
Example
refers to the
Encapsulation
bundling of data School bag is
allows modifying
with the methods one of the most
implemented
that operate on that real examples of
code without
Encapsulation data, or the Encapsulation.
breaking other
restricting of direct School bag can
code who have
access to some of keep our books,
implemented the
an object's pens, etc.
code
components.
ATM Machine;
All are
performing
operations on the
ATM machine
Is the separation
like cash
between the Helps the user to
Data withdrawal,
specification of a avoid writing the
Abstraction money transfer,
data object and its low level code.
retrieve mini-
implementation
statement…etc.
but we can't
know internal
details about
ATM.in
Inheritance Is the process of code reusability The class 'Car'

7
inherits its
properties from
the class
forming a new 'Automobiles'
class from an which inherits
existing some of its
properties from
another class
'Vehicles'.
Is a process of
giving the same A person
message to two or behaves the son
more different Reduces in a house at the
Polymorphis objects and coupling same time that
m produce different between different the person
behaviours functionalities behaves an
depending on how employee in an
the objects receive office.
the mesaage

You might also like