Question:
Write the definition of a class GRAPH in C++ with following description:
Private Members
– XUnit // integer
– YUnit // integer
– Type // char array of size 20
– AssignType() /* Member function to assign value of Type based upon XUnit and YUnit as follows: */
| Condition | Type |
| XUnit = 0 or YUnit = 0 | None |
| XUnit is more than YUnit | Bar |
| XUnit is less than or equal to YUnit | Line |
Public Members
- InXY( ) /* Function to allow user to enter values of XUnit and YUnit and hen invoke AssignType() to assign value of Type*/
- OutXY() //Function to ddisplay XUnit, Yunit and Type
C. Sir| Created: 8-Apr-2019 | Updated: 10-Apr-2019|CBSE12A-2019
