Create a class Overload with an integer data (a) a floating variables (y, z) and a character data (ch) as data members of the class. The member functions of class are as follows:
i) Overload(float q)- a parameterized constructor to assign argument 'q' to 'y'.
ii) Overload(int n, char C)- a parameterized constructor to assign value of arguments
'n' to 'b' and 'C' to 'ch'.
iii) void accept()- to assign an integer value of your choice to the data member z.
iv) void show1()- to print actual values of 'y' and 'z'.
v) void show2()- to print actual values of 'z', 'b', and 'ch'.
Write a main function to create the object of class Overload and print the results by
invoking functions.
Answers
Answered by
0
the collection of eight planets and their moons in orbit round the sun, together with smaller bodies in the form of asteroids, meteoroids, and comets. The planets of the solar system are (in order of distance from the sun) Mercury, Venus, Earth, Mars, Jupiter, Saturn, Uranus, and Neptune.
Similar questions