0% found this document useful (0 votes)
174 views15 pages

Welcome To CSC 303 - 2024

Object oop

Uploaded by

Judefat
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
174 views15 pages

Welcome To CSC 303 - 2024

Object oop

Uploaded by

Judefat
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 15

Welcome to CSC 303

Prof. Moussa .M.Bukar


AGENDA FOR TODAY’S CLASS

1. Couse syllabus
2. Introduction to course
Course Syllabus
Week Topics
1 Course Introduction
2 Basic of Java Programming …Environment ect…
3 Data types, Variables, Operators in Java
4 Control Structures Including Selection, Looping
5 Java Methods, Method overloading, overring..
6 Arrays and Strings in Java
7 Object and Class
8 Midterm-Exam’s week
Week Topics
9. Inheritance and Polymorphism in Java
10. Encapsulation and Abstraction in Java
11. Multithreading in Java
12. Java Interface
13. GUI Programming
14. Lecture Free/ Review
15. Final Exam’s week
Lecture 1: Introduction to OOP
Object-oriented programming (OOP) is a model organized around objects
rather than "actions" and data rather than logic. Historically, a program has
been viewed as a logical procedure that takes input data, processes it, and
produces output data.

The programming challenge was seen as how to write the logic, not how to
define the data. Object-oriented programming takes the view that what we
really care about are the objects we want to manipulate rather than the logic
required to manipulate them
Definition: OOP
Object-Oriented Programming is methodology or Concept to Design a
Program using Object and Class. Why Object come first because it’s an
Object-Oriented not Class Oriented…
Pillars of OOP
Definition: Class
A class is a collection of method and variables. It is a blueprint that
defines the data and behaviour of a type.

Let’s take Human Being as a class. A class is a blueprint for any


functional entity which defines its properties and its functions.
Like Human Being, having body parts, performing various actions.
Definition: Objects
My name is Aliko, and I am an instance/object of class Man.
When we say, Human Being, Man or Woman, we just mean a
kind, you, your friend, and I.

We are the forms of these classes. We have a physical existence


while a class is just a logical definition. We are the objects.
Definition: Inheritance
Inheritance is a feature of object-oriented programming that allows
code reusability when a class includes property of another class.
Considering Human Being a class, which has properties like hands,
legs, eyes, mouth, etc.. and functions like walk, talk, eat, see etc…

Man and Woman are also classes, but most of the properties and
functions are included in Human Being. Hence, they can inherit
everything from class Human Being using the concept of Inheritance.
Definition: Abstraction
Abstraction means, showcasing only the required things to the outside
world while hiding the details. Continuing our example, Human
Being’s can talk, walk, hear, eat, but the details of the muscles
mechanism and their connections to the brain are hidden from the
outside world.
Definition: Encapsulation
Encapsulation means that we want to hide unnecessary details from
the user. For example, when we call from our mobile phone, we select
the number and press call button. But the entire process of calling or
what happens from the moment we press or touch the call button to the
moment we start having a phone conversation is hidden from us.
Definition: Polymorphism
Polymorphism is a concept, which allows us to redefine the way something
works, by either changing how it is done or by changing the parts used to get
it done. This can be done in two ways, overloading and overriding.

Note: If we walk using our hands, and not legs, here we will change the
parts used to perform something. Hence this is called Overloading.

Note: if there is a defined way of walking, but I wish to walk differently, but
using my legs, like everyone else. Then I can walk like I want, this will be
called as Overriding.
Questions?

You might also like