Question
Bookmark Part II A landscaping company needs a program to cost out sodding and fencing for an area, given the length and width in feet.
Bookmark
Part II
A landscaping company needs a program to cost out sodding and fencing for an area, given the length and width in feet. Sod is 47 cents a square foot and fencing is $22.50 a foot.
Part II will produce 2 files.
Pricing.h file is the Pricing class (derived from the Geometry class - the parent class) with its members and functions.
The main cpp file uses the code in the Pricing/Geometry classes.
Here is the format of Pricing.h class. See Display 10.9.
#include "Geometry.h" //Includes the code from Geometry.h
class Pricing : Geometry //Pricing is derived from the Geometry class
{
public:
constructor
Invokes the Geometry constructor.
getSodCost function
receives the price.
Uses the getArea function in the Geometry class.
Returns the area times price.
getFenceCost function:
. Receives the price.
Uses the getPerimeter function in the Geometry class.
Returns the perimeter times price.
private:
};
//Function headers and code
Write a program (cpp file) to produce this output:
Parkton Landscaping Enter length: in Enter width: 12 Landscaping Costs Sod 56 40 Fence 994Step 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