Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please help in Java: You need to use a Circle (for the flower bed) and a Rectangle (for the yard). This program calculates the cost

Please help in Java:

You need to use a Circle (for the flower bed) and a Rectangle (for the yard).

This program calculates the cost of putting a fence all the way around a rectangular yard AND putting sod everywhere in the yard EXCEPT for a circular flower bed. Input consists of the length and width of the yard and the radius of the flower bed (all double and all in feet). The cost of fencing (a constant) is $2.50 per foot and the cost of sod is $1.50 per square foot (another constant). Fencing can only be purchased in one foot sections, and sod can only be purchased by the square foot. (Remember to use ceil)

If you use this input: length 6.2, width 3.4, radius 1.2 Then cost of fence is $50, cost of sod is $25.5, total cost is $75.5

Thanks!!

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

Programming The Perl DBI Database Programming With Perl

Authors: Tim Bunce, Alligator Descartes

1st Edition

1565926994, 978-1565926998

More Books

Students also viewed these Databases questions

Question

Write a program to check an input year is leap or not.

Answered: 1 week ago

Question

Write short notes on departmentation.

Answered: 1 week ago

Question

What are the factors affecting organisation structure?

Answered: 1 week ago

Question

What are the features of Management?

Answered: 1 week ago