O GoConqr está de visual novo! Conte para nós o que você achou.

Notas

OOPs

Saurabh Prasad Inglês 1 página

Conteúdo das notas (1)

Página 1

Object oriented programming

1. Concepts: Class, objects, inheritance, polymorphism, encapsulation abstraction - learning these concepts by using human anatomy

Class: Human being is a class. Class also called as type could be defined as design where everything is defined. Human being as a class has properties like eyes, hand etc and functions like walk (), talk(), see() etc.

Inheritance: Male and Female are also class. Most of properties & functions for male and female are already defined under Human Being class. So they (male & female class) can use inheritance to use these properties and functions from human being class. You don't need to redefine properties and functions already defined under human beings again for male and female classes.

Object: Object is instance of a class which has physical existence. Example- My name is Saurabh and I am an object of class male. You should think of class as a logical definition

Abstraction: Hiding the details from outside world or showing only what's required. Human beings can talk, hear , eat but how its done is hidden from the outside world. Skin could be the abstraction factor which hides mechanism of these functions from outside world.

Encapsulation: This refers to binding properties with functions. This binds properties (eyes, legs, hands) to respective functions (see, walking, holding)

Note: You can define private variables within a class which cannot be accessed outside the class. Now, in order to access these private variables, variable public functions need to be defined within the class. This is called data hiding so encapsulation also leads to data hiding.

Polymorphism:It allows to define more than one way to do something. This could be done by changing the process (overriding)or changing the parts (overloading) of it . If you define, walking is done by hand instead of walking on legs then it is called as overriding. if you are walking in a straight line (normally) and then suddenly you change it to walking backwards then its called overloading..

Informações

Descrição
Notas sobre OOPs, criado por Saurabh Prasad em 15-06-2020.
Criado por
Saurabh Prasad · jun 2020
Atualizado
2 jul 2020
Visualizações
2
Avaliação

Fale Conosco

Sobre o que é sua mensagem?

O que você acha do novo visual?

Você gostou?