QuesAns Print Page – CSKC
Sign In

Search

siteicon
Q&A CBSE12A-2019-A02C #6977

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