Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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:

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Design For Mere Mortals

Authors: Michael J Hernandez

4th Edition

978-0136788041

Students also viewed these Databases questions

Question

Provide examples of Dimensional Tables.

Answered: 1 week ago