2. Introduction
Concept of structured programming
Concept of Object Oriented programming
Encapsulation
Inheritance
Polymorphism
3. STRUCTURED PROGRAMMING
HOW TO PLAY
Initialize the game
Draw the screen
Make moves
Until end of game
Get move from user
Check validity of move
Check if piece taken
Re-draw screen
Check if the game ended
MANUAL
PROCESS
4. STRUCTURED PROGRAMMING
Focus on process and sub process
The logic flow of program must show clearly.
Required previous knowledge of programming
construction
Sequence Construct
Selection Construct
Iteration Construct
5. Activity
Place : Auto teller Machine
Story : You go to the bank to withdraw your
money to pay the course fee. Please find the
process to withdraw the money from bank.
Purpose : Relating this process with structured
programming principles
Tools to design (requirement) : construct a flow
chart or pseuducode.
7. OBJECT ORIENTED
Focus on object
Support THREE principles
Encapsulation
Inheritance
Polymorphism
Collect all related objects into a system
Need to find out the characteristics of object
Check the hierarchic of object if any.
Check required characteristic from other object
8. ENCAPLUSATION
What book have?
How book stocked in library?
What student have?
What normally student do in library?
Finding the
characteristics
Finding the objects
Library
Class/Object
Attributes
Methods
9. ENCAPSULATION
Need to find out the characteristics of object
Find out the attributes(state) of an object
Find out the behavior (methods) of an object
11. Inheritance
Super class (based class) share its attributes
methods to the subclass (derived class)
OR
Subclass (derived class) inherits super class
(based class) attributes and methods.
Super class is
a class which
have
dominant
attributes and
methods
Sub class is a
class which have
less dominant
attributes and
methods related
to super class
12. POLYMORPHISM
Academic Dept
Operation Dept Account Dept
Student Details Report (X)
Student No
Name
Marks
Grade
Student No
Name
Gender
Status
Student No
Name
Payment
Balance
Innovative
Informatics
Students
parameter
13. Polymorphism
A methods which have different form of
actions
In the java programming you are allow to
have
two or more methods with a same name
They are different action to perform certain task