What are the OOPS concepts?

Answer Posted / satya

objects
interface
polymorphism
inheritence
constructors
encapsulation

Is This Answer Correct ?    369 Yes 220 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is cohesion in oop?

822


what type of questions

1868


write a programe to calculate the simple intrest and compund intrest using by function overlading

1867


What is basic concept of oop?

871


What is interface in oop?

852






Can bst contain duplicates?

909


What is the real life example of polymorphism?

834


Are polymorphisms mutations?

874


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

3490


Question: Implement a base class Appointment and derived classes Onetime, Daily, Weekly, and Monthly. An appointment has a description (for example, “see the dentist”) and a date and time. Write a virtual function occurs_on(int year, int month, int day) that checks whether the appointment occurs on that date. For example, for a monthly appointment, you must check whether the day of the month matches. Then fill a vector of Appointment* with a mixture of appointments. Have the user enter a date and print out all appointments that happen on that date.

888


How is polymorphism achieved?

759


What is polymorphism used for?

751


What are constructors in oop?

767


Where You Can Use Interface in your Project

1587


Why do we use class?

798