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

This material may consist of step-by-step explanations on how to solve a problem or examples of proper writing, including the use of citations, references, bibliographies, and formatting. This material is made available for the sole purpose of studying and learning - misuse 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...

This is only a preview of the solution. Please use the purchase button to see the entire solution

$18.00

or $1 if you
register a new account!

Assisting Tutor

Related Homework Solutions

Night Club Management Program
Homework Solution
$25.00
Programming
Computer Science
Night Clubs
Management
Waiters
Bartenders
Administrators
Orders
Employees
Work
Customers
Prices
Tips
Statements
Variables
Objects
Data
Parallel Arrays
System
Log In
Log Out
Privileges
Interfaces
Parsing Line Input in C++
Homework Solution
$28.00
Programming
Computer Science
C++
Classes
ASCII Files
Individual Words
Arrays
Reverse Order
OOP
Functions
Algorithms
Parsing Lines
Strings
Loops
Output
Memory Leaks
One Line Object
Get help from a qualified tutor
Live Chats