INTRODUCTION TO
PROGRAMMING
K.KHAJA MOHIDEEN, B.Sc(CS), M.C.A., M.Phil., M.E.(CSE) , MCSA
ASSISTANT PROFESSOR
AALIM MUHAMMED SALEGH COLLEGE OF ENGINEERING
Introduction
 Concept of structured programming
 Concept of Object Oriented programming
 Encapsulation
 Inheritance
 Polymorphism
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
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
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.
OBJECT ORIENTED
BOARD PIECE
Hi I am a Castle.
What I have?
What I can do?
SQUARE
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
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
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
INHERITANCE
ME
[GEORGE, MALE, 12,
SCHOOL]
FATHER
[SIMONS, MALE, 34,
JOBS]
GRANDFATHER
[JOHN,MALE,78]
UNCLE
[ARNOLD, MALE, 30,
BUSINESS]
LEFT HANDED
COLOR BLIND
LEFT HANDED & COLOR BLIND
LEFT HANDED
MY FAMILY
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
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
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
Activity
ENCAPSULATION
POLYMORPHISM
INHERITANCE
Real Life Problem
Object Oriented
Structured
Different Structured and OOP
Logic

INTRO TO PROGRAMMING.ppt

  • 1.
    INTRODUCTION TO PROGRAMMING K.KHAJA MOHIDEEN,B.Sc(CS), M.C.A., M.Phil., M.E.(CSE) , MCSA ASSISTANT PROFESSOR AALIM MUHAMMED SALEGH COLLEGE OF ENGINEERING
  • 2.
    Introduction  Concept ofstructured programming  Concept of Object Oriented programming  Encapsulation  Inheritance  Polymorphism
  • 3.
    STRUCTURED PROGRAMMING HOW TOPLAY 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  Focuson 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 : Autoteller 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.
  • 6.
    OBJECT ORIENTED BOARD PIECE HiI am a Castle. What I have? What I can do? SQUARE
  • 7.
    OBJECT ORIENTED  Focuson 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? Howbook 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 findout the characteristics of object  Find out the attributes(state) of an object  Find out the behavior (methods) of an object
  • 10.
    INHERITANCE ME [GEORGE, MALE, 12, SCHOOL] FATHER [SIMONS,MALE, 34, JOBS] GRANDFATHER [JOHN,MALE,78] UNCLE [ARNOLD, MALE, 30, BUSINESS] LEFT HANDED COLOR BLIND LEFT HANDED & COLOR BLIND LEFT HANDED MY FAMILY
  • 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 DeptAccount 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 methodswhich 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
  • 14.
  • 15.
    Real Life Problem ObjectOriented Structured Different Structured and OOP Logic