C Apps
C Apps
C Apps
#ifndef _SHAPE_H
#define _SHAPE_H
class FRectangle
public:
FRectangle(double l = 0, double w = 0)
: Length(l), Width(w) {}
void Properties();
private:
double Length;
double Width;
};
#endif // _SHAPE_H
#include <iostream.h>
#include "shape.h"
Length = lgt;
Width = wdt;
return Length;
}
double FRectangle::getWidth() const
return Width;
void FRectangle::Properties()
#ifndef BRICK_H_
#define BRICK_H_
#include "shape.h"
class Brick
public:
Brick() {}
void Display();
private:
FRectangle shape;
char* Color;
char* Texture;
double Thickness;
};
#endif // BRICK_H_
#include <iostream.h>
#include "brick.h"
Thickness = Tck;
Color = clr;
}
Texture = txr;
shape.setLength(l);
shape.setWidth(w);
setThickness(t);
return Color;
return Texture;
void Brick::Display()
#include "brick.h"
void main()
Brick brick;
brick.setColor("Bone White");
brick.setTexture("Early Breeze");
brick.Display();
Length = 12.5
Width = 8.75
Area = 109.375
Volume = 607.031