Class Work Function Name Date 1 te four functions that will

Class Work Function Name Date 1. te four functions that will be called from the main program at Home Depot store. i) Readside will read the side ofa square room from the user and pass the value of side to main program. Please enter the side of your square room: XXX room and pass the value of area to main. iii) Function Perimeter will calculate the perimeter of the square room given the side of the room and pass the value of perimeter to main. iv) Function Estimate will take the area and perimeter of the room from main and display the following: You will need XXX Square feet of carpet. You will need XXX feet of baseboard.

Solution

/*
* Area.h
*
* Created on: Nov 20, 2016
*      Author: sontosh
*/

#ifndef AREA_H_
#define AREA_H_
#include<stdio.h>
#include <iostream>
using namespace std;

class Area {
public:
   Area();
   virtual ~Area();

   int main(){
       float side, area, perimeter;
       ReadSide(side);
       CalcArea(side);
       Perimeter(side);
       Estimation(area,perimeter);
   }
   float ReadSide(float side){
       cout<<\"Enter sides of the square\";
       cin>>side;


   }
   float CalcArea(float side){
       cout<<\"area of the figure is\"<<endl;
       cout<<side*side<<endl;

   }
   float Perimeter(float side){
       cout<<\"peri of the figure\"<<endl;
       cout<<4*side<<endl;

   }
   float Estimation(float area,float perimeter){
     cout<<\"estimation for the room\"<<endl;
     cout<<area<<perimeter<<endl;
      cout<<\"required carpet is \"+area+\"sq ft\";<<endl;
   }
};

#endif /* AREA_H_ */

 Class Work Function Name Date 1. te four functions that will be called from the main program at Home Depot store. i) Readside will read the side ofa square roo

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site