Answered step by step
Verified Expert Solution
Question
1 Approved Answer
1 5 0 , RGB ( 2 5 5 , 1 0 0 , 1 0 0 ) . base = alturad = 1 0
RGB base alturad ; color RGB;
call the fPLot function of the object where the console pixels are painted, taking into
consideration the initial values that were applied to the object.
void RecticfPlet SetWindeWPesmCCensle SWPNOMOVE SWPNOZORDER; for int ycoer yIrait; cser XInit intgltura; yCoervertical plot ReleaseccmCensole mDC; Flowchart draw a flow chart.Make a project in C that encodes an object called a rectangle of the Rect class where it invokes a function that paints the pixels of the rectangle's measure in red.
Encode a "header" file with the attributes of the class objects and their functions, where the fPlot function is found, which is to paint the rectangle in the console.
Header file:
#ifndef RECTH
#define RECTH
#include "windows.h
class Rect
private:
double base, altura, xInit, yInit;
COLORREF color;
public:
Rect;
Rectdouble double, double, double, COLORREF;
~Rect;
void setBasedouble;
void setAlturadouble;
double getBase const;
double getAltura const;
void setColorCOLORREF;
void setCoordsdouble double;
void mooveCoordsdouble double;
void fPlot;
void fErase;
;
#endif
Encode an object called a rectangle, which is initialized with the values: RGB
Rect::Rect
base altura ;
xInit yInit ;
color RGB;
default constructor
call the fPLot function of the object where the console pixels are painted, taking into consideration the initial values that were applied to the object.
void Rect::fPlot
HWND myConsole GetConsoleWindow;
SetWindowPosmyConsole SWPNOMOVE SWPNOZORDER;
HDC myDC GetDCmyConsole;
for int yCoor yInit; yCoor yInit intaltura; yCoorvertical plot
for int xCoor xInit; xCoor xInit intbase; xCoorhorizontal plot
SetPixelmyDC xCoor, yCoor, color; pixel painter
ReleaseDCmyConsole myDC;
plotting functionMake a project in that encodes an object called a rectangle of the Rect class
where it invokes a function that paints the pixels of the rectangle's measure in red.
Encode a "header" file with the attributes of the class objects and their functions, wher
the fPlot function is found, which is to paint the rectangle in the console.Header file:
#ifndef RECTH
#define RECTH
#include "windows.h
class Rect
private:COLORREF SOlor:
public:Rectdouble double, double, double, COLORREF;void setbasedouble;double getRase const;void SetcolacCOLORREF;void megecoerdsdouble double;void fEcase;Make a project in that encodes an object called a rectangle of the Rect class
where it invokes a function that paints the pixels of the rectangle's measure in red.
Encode a "header" file with the attributes of the class objects and their functions, wher
the fPlot function is found, which is to paint the rectangle in the console.Header file:
#ifndef RECTH
#define RECTH
#include "windows.h
class Rect
private:COLORREF SOlor:
public:Rectdouble double, double, double, COLORREF;void setbasedouble;double getRase const;void SetcolacCOLORREF;void megecoerdsdouble double;void fEcase;
;
#endif
;
#endif
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started