# (1) Problem Statement One of the services provided by Green Fields...

## Question

(1) Problem Statement
One of the services provided by Green Fields Landscaping is the sale and delivery of mulch, which is measured and priced by the cubic yard. You have been asked to create a program that will determine the number of cubic yards of mulch the customer needs and the total price.
Program Design
Program Steps
The program must carry out the following general steps (This list of steps is sometimes called General Pseudocode):
1. Set the price for a cubic yard of mulch (currently 22.00).
2. Ask the user to input the number of square feet to be covered and the depth of the mulch to be spread over this area.
3. Calculate the number of cubic feet of mulch needed.
4. Calculate the number of cubic yards of mulch needed.
5. Calculate the total price for the mulch.
6. Display the results.
(2) Problem Statement
Another of the services provided by Green Fields Landscaping is the sale of evergreen trees, which are priced by height. Customers have the choice of purchasing a tree on a “cash and carry” basis, of purchasing a tree and having it delivered, or of purchasing a tree and having it both delivered and planted. You have been asked to develop a program that uses the number of trees purchased, their height, and the delivery and planting information to create a customer invoice. Assume for now that all trees purchased are the same height.
Program Design
Program Steps
The program must carry out the following general steps:
1. Have the user input the number of trees purchased and their height.
2. Have the user indicate if the trees will be planted by Green Fields.
3. If planting service is not desired, have the user indicate if they want delivery.
4. Calculate the total tree cost.
5. Calculate the planting and delivery charges.
6. Calculate the total of all charges.
7. Print a bill that displays the purchase information and all charges.

## Solution Preview

These solutions may offer step-by-step problem-solving explanations or good writing examples that include modern styles of formatting and construction of bibliographies out of text citations and references. Students may use these solutions for personal skill-building and practice. Unethical use is strictly forbidden.

#include <iostream>
#include <iomanip>
using namespace std;

int main()
{
const double PRICE_PER_TREE = 30.00;    // the cost of each tree (since the height is the same for all)

const double PER_TREE_DELIVERY_FEE = 5.00, // delivery fee per tree

MAX_DELIVERY_FEE=50; //maximum delivery fee when the purchased number is > 10

int    no_of_trees,       // how many trees are purchased
height_of_trees; // expressed in feet - the same for all trees
char    are_planted,             // Yes/No value if the trees are/aren't planted? ('Y'/'N')
are_delivered;          // if the trees must be delievered or not ('Y'/'N')
double...

By purchasing this solution you'll be able to access the following files:
invoicefinal.cpp, cubicyards.cpp and Solution.txt.

\$16.10
for this solution

or FREE if you
register a new account!

PayPal, G Pay, ApplePay, Amazon Pay, and all major credit cards accepted.

### Find A Tutor

View available C-Family Programming Tutors

Get College Homework Help.

Are you sure you don't want to upload any files?

Fast tutor response requires as much info as possible.