Write the function definitions of the pixel class


Discussion:

Q: Give the class declaration

class point
{
public:
int xcoordinate();
int ycoordinate();
point(in initializeX, in initialize Y);
private:
int x;
int y;
};

1: Suppose we have a type declaration as follows:
enum status {on, off};

declare a class Pixel that inherits from class Point. Class Pixel will have an additional data member of type Status name Statustype; it has its own constructor that recieves three parameters.

2. Write client statements that creates Pixel objects, FirstPixel with an initial (x,y) position of (5,9) and status OFF

3.Write client code to print out the current X and coordiantes and the status of the first pixel

4. Write the function definitions of the Pixel class constructor adn the CurrentStatus member functions.

Solution Preview :

Prepared by a verified Expert
C/C++ Programming: Write the function definitions of the pixel class
Reference No:- TGS01937526

Now Priced at $20 (50% Discount)

Recommended (94%)

Rated (4.6/5)