features of OOPS
Answers were Sorted based on User's Feedback
Answer / praveen
1. Encapsulation: Binding of Code and data together in a
single entity
2. Polymorphism: One name many properties (funtion
Overloading)
3. Inheritance:Acquiring properties of one object to another
Is This Answer Correct ? | 233 Yes | 46 No |
Answer / vandana
class,objects,inheritance,encapsulation,constructor,abstrcti
on,polymorphism.
Is This Answer Correct ? | 138 Yes | 42 No |
Answer / ravi
Abstration : hiding essential features and showing non
essential features.
Encapsulation : grouping the code and data.
Inheritence : aquiring the properties of one class into other.
polymariphism : one function many forms.
Is This Answer Correct ? | 120 Yes | 39 No |
Answer / jayati dev
Abstraction
Abstraction is a process of identifying the relevant
qualities and behvaiors an object should possess. Lets take
an example to understand abstraction. A Laptop consists of
many things such as processor, motherboard, RAM, keyboard,
LCD screen, wireless antena, web camera, usb ports, battery,
speakers etc. To use it, you don't need to know how
internally LCD screens, keyboard, web camera, battery,
wireless antena, speakers works. You just need to know how
to operate the laptop by switching it on. The intrinsic
details are invisitble. Think about if you would have to
call to the engineer who knows all internal details of the
laptop before operating it. This would have highly expensive
as well as not easy to use everywhere by everyone. So here
the Laptop is an object that is designed to hide its complexity.
Think If you need to write a piece of software to track the
students details of a school, you may probably need to
create Students objects. People comes in all different
backgrounds, educational qualifications, locations, hobbies,
ages and have multiple religion, language but in terms of
application, an student is just a name, age, class and roll
number, while the other qualities are not relevant to the
application. Determining what other qualities (background,
qualifications, location, hobbiels etc) are in terms of this
application is abstraction.
In object-oriented software, complexity is managed by using
abstraction. Abstraction is a process that involves
identifying the critical behavior of an object and
eliminating irrelevant and complex detilals. A well
thought-out abstraction is usually simple, and easy to use
in the perspective of the user, the person who is using your
object.
Encapsulation
Encapsulation is a method for protecting data from unwanted
access or alteration by packaging it in an object where it
is only accessible through the object's interface.
Encapsulation are often referred to as information hiding.
But both are different. Infact information hiding is
actually the result of Encapsulation. Encapsulation makes it
possible to separate an object's implementation from its
orgiinal behavior - to restrict access of its internal data.
This restriction facilitate certains detiails of an object;s
behavior to be hidden. This allows to protect an object's
interal state from corruption by its user.
It is the mechanism by which Abstraction is implemented. In
other words you can say that it is the result of the
Encapsulation. For example, the Laptop is an object that
encapsulates many technologies/hardwares that might not be
understood clearly by most people who use it.
Inheritence
Inheritecne is the ability to define a new class or object
that inherits the behavior and its functionality of an
existing class. The new class or obejct is called a child or
subclass or derived class whie the original class is called
parent or base class. For example, in a software company
Software Engineers, Sr. Software Engineers, Module Lead,
Technical Lead, Project Lead, Project Manger, Program
Manger, Directors all are the employees of the the compnay
but their work, perks, roles, responsiblitues differs. So in
OOP, the Employee base class would provide the common
behaviours of all types/level of of employee and also some
behaviors properties that all employee must have for that
company. The particular sub class or child class of the
employee would impelement behaviors specific to that level
of the employee. So by above example you can notice that the
main concept behind inhertience are extensibility and code
reuse (in this case you are extending the Employee class and
using its code into sub class or derived class).
Polymorphism
As name suggests, Polymorphism means an ability to assume
different forms at different places. In OOP, it is a
language's ability to handle objects differently based on
their runtime type and use. Polymorphism is briefly
described as "one interface, many
implementations".Ppolymorphism is a characteristic of being
able to assign a different meaning or usage to something in
different contexts - specifically, to allow an entity such
as a variable, a function, or an object to have more than
one form.
There are two types of polymorphism.
1. Compile time polymorphism - It is achieved by
overloading functions and operators
2. Run time polymorphism - It is achieved by overriding
virtual functions
Lets say you have a class that have many Load methods having
different parameters, this is called Compile time
polymorphism. Lets take another example where you have a
virtual method in the base class called Load with one
parameter and you have redefined its functioanlity in your
sub class by overriding base class Load method, this is
called Run time polymorphism.
Is This Answer Correct ? | 86 Yes | 14 No |
Answer / pratap557
Class: an Abstract Model of a real world entity or Concept
or thinking. Like Car , Human being, PayRoll,etc.
Object: An instance( which is besically representing the
class)shows class's attributes through some public or
private method(internally)
Method: private or public functions associted with a Calss
to access the Class (Object)
Massage Passing: Interaction(exchanging data) between two
objects
Abstraction : This is a concept by which we only acess the
necessary attributes of that calsss without knowing more
about the other attrkibutes or methods opf that cals( some
waht like wrapping)
Encapsulation: Hiding data (attributes of a class from
other)by eclaring private , public etc
Inheriatance: Creating new class from patrent class. As
Mammal class is inherited from Animal Class again Human
being is achild class of Mammal
polymorphism: method overloading, virtual functions
Is This Answer Correct ? | 91 Yes | 23 No |
Answer / chabi
features of oops:
objects.
classes
encapsulation
abstraction
inheritance
polymorphism
dynamic binding
message communication
Is This Answer Correct ? | 84 Yes | 20 No |
Answer / jai prakash chahan
class
object
encapsulation
inheritence
polymorphism
messege passing
dynamic binding
Is This Answer Correct ? | 69 Yes | 18 No |
Answer / jyotsna pandey
object
class
inheritence
polymorphism
encapsulation
data abstraction
dynamic binding
message passing
Is This Answer Correct ? | 60 Yes | 17 No |
Answer / abhijit
Abstraction
Abstraction is a process of identifying the relevant
qualities and behvaiors an object should possess. Lets take
an example to understand abstraction. A Laptop consists of
many things such as processor, motherboard, RAM, keyboard,
LCD screen, wireless antena, web camera, usb ports, battery,
speakers etc. To use it, you don't need to know how
internally LCD screens, keyboard, web camera, battery,
wireless antena, speakers works. You just need to know how
to operate the laptop by switching it on. The intrinsic
details are invisitble. Think about if you would have to
call to the engineer who knows all internal details of the
laptop before operating it. This would have highly expensive
as well as not easy to use everywhere by everyone. So here
the Laptop is an object that is designed to hide its
complexity.
Think If you need to write a piece of software to track the
students details of a school, you may probably need to
create Students objects. People comes in all different
backgrounds, educational qualifications, locations, hobbies,
ages and have multiple religion, language but in terms of
application, an student is just a name, age, class and roll
number, while the other qualities are not relevant to the
application. Determining what other qualities (background,
qualifications, location, hobbiels etc) are in terms of this
application is abstraction.
In object-oriented software, complexity is managed by using
abstraction. Abstraction is a process that involves
identifying the critical behavior of an object and
eliminating irrelevant and complex detilals. A well
thought-out abstraction is usually simple, and easy to use
in the perspective of the user, the person who is using your
object.
Encapsulation
Encapsulation is a method for protecting data from unwanted
access or alteration by packaging it in an object where it
is only accessible through the object's interface.
Encapsulation are often referred to as information hiding.
But both are different. Infact information hiding is
actually the result of Encapsulation. Encapsulation makes it
possible to separate an object's implementation from its
orgiinal behavior - to restrict access of its internal data.
This restriction facilitate certains detiails of an object;s
behavior to be hidden. This allows to protect an object's
interal state from corruption by its user.
It is the mechanism by which Abstraction is implemented. In
other words you can say that it is the result of the
Encapsulation. For example, the Laptop is an object that
encapsulates many technologies/hardwares that might not be
understood clearly by most people who use it.
Inheritence
Inheritecne is the ability to define a new class or object
that inherits the behavior and its functionality of an
existing class. The new class or obejct is called a child or
subclass or derived class whie the original class is called
parent or base class. For example, in a software company
Software Engineers, Sr. Software Engineers, Module Lead,
Technical Lead, Project Lead, Project Manger, Program
Manger, Directors all are the employees of the the compnay
but their work, perks, roles, responsiblitues differs. So in
OOP, the Employee base class would provide the common
behaviours of all types/level of of employee and also some
behaviors properties that all employee must have for that
company. The particular sub class or child class of the
employee would impelement behaviors specific to that level
of the employee. So by above example you can notice that the
main concept behind inhertience are extensibility and code
reuse (in this case you are extending the Employee class and
using its code into sub class or derived class).
Polymorphism
As name suggests, Polymorphism means an ability to assume
different forms at different places. In OOP, it is a
language's ability to handle objects differently based on
their runtime type and use. Polymorphism is briefly
described as "one interface, many
implementations".Ppolymorphism is a characteristic of being
able to assign a different meaning or usage to something in
different contexts - specifically, to allow an entity such
as a variable, a function, or an object to have more than
one form.
There are two types of polymorphism.
1. Compile time polymorphism - It is achieved by
overloading functions and operators
2. Run time polymorphism - It is achieved by overriding
virtual functions
Lets say you have a class that have many Load methods having
different parameters, this is called Compile time
polymorphism. Lets take another example where you have a
virtual method in the base class called Load with one
parameter and you have redefined its functioanlity in your
sub class by overriding base class Load method, this is
called Run time polymorphism.
Is This Answer Correct ? | 15 Yes | 2 No |
Answer / prp
The primary features of an object oriented language are:
Encapsulation - This allows every object to have its own
properties and behaviors separate from others, and its own
little "capsule" to keep its properties in.
Inheritance - This allows an object to inherit the
properties of its ancestors.
Polymorphism - The allows an object to be treated like one
of its ancestors, i.e. if Truck was a subclass or
descendant of an object called Automobile, it can redo
behaviors that Automobile had, like Automobile has a
suspension feature that has it set to 10 inches tall, Truck
overwrites it and says its 30 inches tall.
Abstraction - This idea is related to encapsulation in that
you don't care how the object works, but you can make it
behave in certain manners.
Is This Answer Correct ? | 17 Yes | 5 No |
1. Strong name 2. how to prevent a class from being inherited 3. delegates 4. default modifier for interface 5. default modifier for class 6. base class for exception 7. diff bet trigger and view in sql 8. how to exchange values from one page to another page 9. can multiple catch block ll be executed at same time 10. can u store different data types in an array & array list 11. when we ll use trigger 12. try,catch,finally usage
What are the 3 pillars of oop?
What Is a Polymorphism? How many types of polymorphism and whats that use in application?
Which language is not a true object oriented programming language?
What do you mean by multiple inheritance and multilevel inheritance? Differentiate between them.
#include <string.h> #include <stdio.h> #include <stdlib.h> #include<conio.h> void insert(char *items, int count); int main(void) { char s[255]; printf("Enter a string:"); gets(s); insert(s, strlen(s)); printf("The sorted string is: %s.\n", s); getch(); return 0; } void insert(char *items, int count) { register int a, b; char t; for(a=1; a < count; ++a) { t = items[a]; for(b=a-1; (b >= 0) && (t < items[b]); b--) items[b+1] = items[b]; items[b+1] = t; } } design an algorithm for Insertion Sort
How do you define a class in oop?
In which cases you use override and new base?
what is the abstract class,interface ,its difference with a programatic eg.? hi,recently i went for an interview they ask me what is abstract class ,interface and its difference I said abstract class contain abstact method ,abstract method is a method with no body.Abstract class cannot be instantiated.Abstract class is a base class it required derived class for the implementation of method. Interface is a syntactical contract that all derived class should follow it define properties ,method,events which are known as member of interface. Then They asked me what is the difference between them. I said abstract class interface 1.abstact class can implement method 1.interface cant 2.abstact class can contain constructor, 2.interface cant destructor 3.abstract class cannot support multiple 3.interface support inheritance etc Then they said some different answer I said dont no. Then they ask me when i should make abstract class for an project and when i should make interface. I said if suppose there is two class which must be having method with different logic then we sholud make abstract class. and if suppose we have two class having method .with different logic then we can make interface . Am i correct with my explaination.if not correct me .please provide me that when should we create abstract class and interface and what is difference .please help me
what is the definition of incapsulation
What is coupling in oop?
What is the full form of oops?