Question: Using C++ PRG-1. Create a class named One with two integer data members, x and y, and two member functions get X and get Y.
PRG-1. Create a class named One with two integer data members, x and y, and two member functions get X and get Y. Define the interface file, the implementation file, and an application file that instantiates one object from the class and prints the values of x and y. PRG-2. Create a class named Two with one integer data member named x and one character data member named a. Define four member functions get X,getA,setX, and setA. Define the interface file, the implementation file, and an application file that instantiates one object from the class and prints the values of data members. Then set the values of data members through the mutator functions and print their values again
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
