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.
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.
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.
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>
using namespace std;
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')
By purchasing this solution you'll be able to access the following files:
invoicefinal.cpp, cubicyards.cpp and Solution.txt.