Programming languages
Programming languages
Languages
Program:-
A computer program is a set of instructions
arranged in a step by step process based on
some algorithm to perform a specific task.
Software: -
Software is a collection of programs and data
files that are designed to perform some
operations.
Programming Language: -
Programming language is
a language developed for
writing programs for a
computer in a well-
defined way and with a
set of rules.
Types of
Programming
Languages
• Assembly language
(Organised Most functions share global data leaving data at risk of corruption.
Object:-
An object is a real world
entity having some
characteristics and
behaviour.
It has its own unique
identity.
Object Characteristics Behaviour
(Attributes)
Table Flat Top, Made of Wood, Keep_things
colour
Fan 3 blades, 1 handle, Circulates_air,
colour , motor exhaust, cooling
purpose
Inspection of Keyboard Plastic, colour, no of enter data, give
an object keys, cable commands
Attributes:- Name, rollno, address, etc Attributes:- colour, breed, etc Attributes:- material, colour, capacity
Behaviour:- read, play, etc Behaviour:- barking, wagging tail etc Behaviour:- filling, open,close etc
etc
Behaviour:- watching, changechannel,
increasevolume, etc
Behaviour:- drive, applybreak, changegear,
slow down, turn left/right etc
More examples of an object
Bird smartphone
fly( ) call( )
beakWiping( ) behaviour createAccount( ) behaviour
wingFlapping( ) sendMessage( )
What is a class?
Class car
OBJECTS
How to Create a class?
Name - What is it ?
Student, Employee, BankAccount, Document, Car, Box…..
Characteristics/
Attributes - What describes it ? Properties/data
name, salary, balance, size, color, width…..
Operations
Behavior - What can it do ? /Methods
read, play, search, save, create, print, close, open, deposit…..
Example class
Name - Box
Box
ClassName
List
Of
length
Attributes
.breadth
.height
List
Of
open( )
Operations
close( ) Box1 Box2 Box3
.calculateArea()
.
Name - Student
Student
ClassName
Rahul Jayasree
name Asha 67
List 12
RollNo 34 9980023123
Of 9023412345
contact_no 9900192345 89
Attributes 78
56 72
.sub1 80
78 44
.sub2 87
sub3 98
List
accept( )
Of
calculateTotal( )
Operations Rahul Asha Jayasree
edit_contact_no( )
.
calculate_Average( )
.
Name - BankAccount
ClassName
BankAccount
List
open( )
Of
close( )
Operations RahulAcct AshaAcct JayaAcct
deposit( )
.
withdraw( )
.
Object :- (Instance)
➢Object is a representation of a class that includes the characteristics and
behaviour defined within the class.
Example 1:
class: House
Attributes: Address, Color, Area
Behavior: Open door, close door
Example 2:
class: car
Attributes: Model,colour, reg_No
Behavior: applyGear(), drive(), brake()