What is a class?

Answer Posted / preethi

In object-oriented programming , a class is a template
definition of the method s and variable s in a particular
kind of object . Thus, an object is a specific instance of
a classClass is the Collection of Methods and Datafield, in
other
word we can say class is user defined Data Types
; it contains real values instead of variables

Is This Answer Correct ?    3 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is constructor in oop?

589


What is polymorphism programming?

605


write a code for this. serial_number contained in the header of the file will be read , if this serial number is less than a previous serial number within a successfully processed file, or is the same as another serial number within a successfully processed file, or if the field contains anything other than 7 digits, then the file must error with the reason ‘Invalid SERIAL_NUMBER’.

1780


What are different types of JVM's? for example we use dalvik jvm for android then what about the remaining operating systems?

1652


#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.

3254






What is coupling in oops?

598


What does sksksk mean in text slang?

1537


What is meant by multiple inheritance?

738


Why is polymorphism needed?

602


any one please tell me the purpose of operator overloading

1967


Why interface is used?

555


Can an interface inherit a class?

563


What is abstraction encapsulation?

657


How do you answer polymorphism?

577


What is an example of genetic polymorphism?

651