features of OOPS

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why it is called runtime polymorphism?

573


Why is abstraction used?

599


What is the full form of oops?

603


What is inheritance write a program to show use of inheritance?

607


write a code for this:trailer recordId contains a value other than 99, then the file must error with the reason ‘Invalid RECORD_ID’(User Defined Exception).

1636






Explain the advantages of inheritance.

666


What is balance factor?

576


#include #include #include #include void insert(struct btreenode **, int); void inorder(struct btreenode *); struct btreenode { struct btreenode *leftchild; struct btreenode *rightchild; int data; }; main() { struct btreenode *bt; bt=(struct btreenode *)NULL; int req,i=1,num; clrscr(); printf("Enter number of nodes"); scanf("%d",&req); while(i<=req) { printf("Enter element"); scanf("%d",&num); insert(&bt,num); i++; } inorder(bt); } void insert(struct btreenode **sr, int num) { if(*sr==NULL) { *sr=(struct btreenode *)malloc (sizeof(struct btreenode)); (*sr)->leftchild=(struct btreenode *)NULL; (*sr)->rightchild=(struct btreenode *)NULL; (*sr)->data=num; return; } else { if(num < (*sr)->data) insert(&(*sr)->leftchild,num); else insert(&(*sr)->rightchild,num); } return; } void inorder(struct btreenode *sr) { if(sr!=(struct btreenode *)NULL) { inorder(sr->leftchild); printf("\n %d",sr->data); inorder(sr->rightchild); } else return; } please Modify the given program and add two methods for post order and pre order traversals.

3240


What is polymorphism used for?

564


What is class in oop with example?

608


What is polymorphism in oops with example?

525


When not to use object oriented programming?

563


Which is better struts or spring?

612


Why do while loop is used?

568


What is data binding in oops?

576