Already have an account? Get multiple benefits of using own account!
Login in your account..!
Remember me
Don't have an account? Create your account in less than a minutes,
Forgot password? how can I recover my password now!
Enter right registered email to receive password!
Virtual Functions
The keyword virtual was previously used to resolve ambiguity for a class derived from two classes, both having a common ancestor. These classes are known as virtual base classes. This time it helps in implementing the idea of polymorphism with class inheritance. The function of the base class can be declared with the keyword virtual. The program with this change and its output is given below.
class Shape
{
public :
virtual void print()
cout << " I am a Shape " << endl;
}
};
class Triangle : public Shape
void print()
cout << " I am a Triangle " << endl;
class Circle : public Shape
cout << " I am a Circle " << endl;
void main()
Shape S;
Triangle T;
Circle C;
S.print();
T.print();
C.print();
Shape *ptr;
ptr = &S;
ptr -> print();
ptr = &T;
ptr = &C;
Write a program that writes your name on the monitor ten times. Write this program three times, once with each looping method.
Ask question #Minimum 1Loan negotiation is usually not a straightforward task. A type of loan is the discount installment loan. This type of loan has the following characteristics.
please do send me the coding of this program
C Program for MAXIMUM NO, MINIMUM NO AND SORTING void main() { int i,j,t; int a[5]; clrscr(); for(i=0;i
A palindrome is a string that reads the same from both the ends. Given a string S convert it to a palindrome by doing character replacement. Your task is to convert S to palindrome
I. COURSE DESCRIPTION Develops a working knowledge of object-oriented concepts in areas of classes, inheritance, data structures, error handling, templates and file processing.
Write a program to calculate e^x using the formula: e^x = 1 + x/1! + x^2/2! + x^3/3! + ...... Allow the user to enter the integer number x, then do the calculation in a loop (for
Program to store family members details in C++: #include #include #include struct record { char name[30]; int age; char state[40]; }x; //cal
Dereferencing the Pointer this Sometimes a member function requires to make a copy of the invoking instance so that it can change the copy without affecting the original instan
Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!
whatsapp: +91-977-207-8620
Phone: +91-977-207-8620
Email: [email protected]
All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd