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!
Pure Virtual Functions
An abstract class is one, which is used just for deriving some other classes. No object of this class is declared and used in the program. Likewise, there are pure virtual functions which themselves won't be used. Consider the above example with some changes.
class Shape
{
public :
virtual void print() = 0; // Pure virtual
function
};
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;
Shape *ptr;
ptr = &T;
ptr -> print();
ptr = &C;
Write a program to find the area under the curve y = f(x) between x = a and x = b, integrate y = f(x) between the limits of a and b. The area under a curve between two points can b
Ask que
Write a program called A1Q3, that reads it the radius of a circle as an integer and prints the circle's diameter, circumference and area. Use a constant value for pi. Do all calc
Consider the following example: int max(int x, int y) { return ( x > y) ? x : y ; } float max
example of program to ad two numbers
Write a function that has a single int parameter n and returns an int: 0 if n is negative, otherwise 1. You are not allowed to simply check the integer value, and should use the fu
Define the Recursion Function in C? In C, it is potential for the function to call themselves a function is describing 'recursive' if a statement within the body of a function
A: A reference has to always refer to some object and, so, must always be initialized; pointers do not have such limits. A pointer may be reassigned to point to distinct objects wh
At a shop of marbles, packs of marbles are prepared. Packets are named A, B, C, D, E …….. All packets are kept in a VERTICAL SHELF in random order. Any numbers
Assume variables x, f, and d are of type int, float, and double, respectively. Their values are arbitrary, except that neither f nor d equals +∞, -∞, or NaN . For each of the fo
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