Question

In: Computer Science

Please assist me with this C++ problem. Lawn Mowing Company: A lawn mowing company offers to...

Please assist me with this C++ problem.

Lawn Mowing Company: A lawn mowing company offers to mow one acre of grass for $150. An acre equals 43,450 square feet. There are 3 feet in a yard. And, a standard soccer field, with buffer for the sidelines is about 140 yards by 100 yards. How much would it cost to hire this company to mow the one soccer field? Assume that the company does calculate for partial acres. Write a program to calculate the total cost and display it to the screen. Starter code has been provided for this problem:

https://www.onlinegdb.com/r15z8TfE4

Solutions

Expert Solution

Program.cpp:

#include <iostream>
#include <iomanip>

using namespace std;

int main()
{
const int sq_ft_per_acre = 43450;
const int ft_per_yd = 3;
float cost_per_acre = 150.0;
float field_width = 100; // width in yards
float field_length = 140; // length in yards
int sq_ft_per_field;
float num_acres;
float total_cost;
  
// Using what you know about units and calculating area, finish the following
// statement to determine the number of square feet of the field.
sq_ft_per_field = field_width*ft_per_yd * field_length * ft_per_yd;
  

// Now, determine the number of acres in the field.
num_acres = (float)sq_ft_per_field/sq_ft_per_acre;
  
  
// Now, determine the cost to mow the field.
total_cost = num_acres * cost_per_acre;
  
std::cout<< std::fixed<<std::setprecision(2);// used to format output to 2 decimals

std::cout<<"Total cost to mow a soccer field: "<<total_cost<<endl;
// And, finally, display the cost. Ideally, you should format this so it only
// shows two decimal places. Study the output formatting section in the lecture
// notes - and, if needed, including a new library above.

}

Output:

​​​​​​​


Related Solutions

If you are willing to sell your lawn mowing business for $355,000 and someone offers you...
If you are willing to sell your lawn mowing business for $355,000 and someone offers you $320,000 for it, the transaction will generate: a. There is no surplus created b. $35k worth of seller surplus and an unknown amount of buyer surplus c. $35 k of both seller and buyer surplus d. $35k of buyer surplu
Yvette’s Yard Service (YYS) is a company that provides lawn mowing services. Suppose that the only...
Yvette’s Yard Service (YYS) is a company that provides lawn mowing services. Suppose that the only way to mow one lawn is for one worker to use one lawn mower for one day. Two workers with one lawn mower, or one worker with two lawn mowers, can still only mow one lawn per day. Draw the one-unit isoquant for YYS. Assuming that YYS’ production technology exhibits constant returns to scale, draw several more isoquants. Assuming that YYS rents lawn mowers...
Company G is America's largest manufacturer of both commercial and residential lawn mowing equipment. Company has...
Company G is America's largest manufacturer of both commercial and residential lawn mowing equipment. Company has relied on comanpy B and company C (2 diffenrent vendors) to supply engines for the mowers. Company A views B & C as qualified and would chooses based on the availibility and pricing. Past year they purchased 80% from B and 20% from C. Company C aqcuired another engine company to increase its economies of scale. Later that year becasue of the possible enhanced...
Please someone assist me with the following problem please! 5. K-nearest-neighbor Given the training data set...
Please someone assist me with the following problem please! 5. K-nearest-neighbor Given the training data set shown below Sample x Y Label? 1 1 5 Yes 2 2 4 Yes 3 3 2 No 4 0 1 Yes 5 5 5 No 6 4 4 No Predict the label for a sample, [2, 2] by using 1) 1-nearest neighbor. Show steps. 2) 3-nearest neighbor. Show steps. 6. K-means Given six data points, X1: (1, 1) X2: (5, 5) X3: (1,...
Create a simple Chart of Accounts for an owner/ operator business such as a lawn mowing...
Create a simple Chart of Accounts for an owner/ operator business such as a lawn mowing round and also mention how the opening balance for each cost centre/ account can be established? Discuss in 80–100 words.
Can someone please assist me with this question. The information that I found was not of...
Can someone please assist me with this question. The information that I found was not of help. Discuss how using systems thinking will influence your decision-making. I have to do a full paragraph on this question.
1. Manny’s Mowers operates in the perfectly competitive lawn mowing industry with a market price of...
1. Manny’s Mowers operates in the perfectly competitive lawn mowing industry with a market price of $40 and MC = 4q. What is Manny’s profit maximizing output? Question 17 options: a) 10 b) 20 c) 40 d) it depends on how many mowers Manny owns. e) it depends on how many employees Manny has. 2. In the short run, any firm will operate at a loss as long as Question 6 options: a) the profit maximizing price is higher than...
Audit and Investigation- Please assist me in answering this in essayform please. Thank you so much...
Audit and Investigation- Please assist me in answering this in essayform please. Thank you so much As part of the planning an audit and designing an audit approach one major part of the planning is to understand the client’s business and industry. Select a specific business example and provide a bullet point analysis of what would be of interest in the understanding of that client business and industry and its impact on the audit
Small Business Management- Can you please assist me with answering this question. Please be sure to...
Small Business Management- Can you please assist me with answering this question. Please be sure to include an example and explanation in discussion is thorough. Kindly include citation in the discussion where necessary. Also please provide reference. Thank you so much. I will really appreciate this. Again thank you. 1. Cash flow is more important than profit for a small business. Discuss this statement and include examples in your response. Value 10 points
Hi There Please assist me on this essay. The subject is Management Accounting. Seiko Manufacturers is...
Hi There Please assist me on this essay. The subject is Management Accounting. Seiko Manufacturers is expected to commence business on 01 July 2020, making smart watches. The budgeted figures for July 2020 (Question 1) and August 2020 (Question 2) are provided below. You are expected to assist Seiko Manufacturers in its planning phase by undertaking CVP analysis and preparing an income statement using absorption costing. Question 1: Estimated production and sales                                       3000 units Selling price per watch                                                     R900 VARIABLE...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT