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:

Bookmark Part II A landscaping company needs a program to cost out

Parkton Landscaping Enter length: in Enter width: 12 Landscaping Costs Sod 56 40 Fence 994

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!