Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Paintcircle, in a fle called Paint. py, to compute the cost of paint to be used to paint a cirecle. Assume a itre of paint

image text in transcribed
image text in transcribed
Paintcircle, in a fle called Paint. py, to compute the cost of paint to be used to paint a cirecle. Assume a itre of paint covers 11 square feer and the cost of one litre of paint is $15.00.Your class should include the following class and instance variables and PAINTCOST to hold the cost of one litre of paint COVERAGE to hold the surface area that a litre of paint covers radius to hold the radius of the circle . a constructor method with a default radius of 1 a getRadius method to access the radius a getsArea method to compute and return the surface area of the circle , eoPaint method to compate the nuimber of litres of paint need to paint the circle Note: The puim? can only be bough in oor litre cans, hence your result shouald be a so if, for example, 2.5 litres are required, then your method must reurn 3 litres rather than 2.5 litres. There must be at learst enough paint to cover the circle a getPaintCost method to e te and return the cost of the paint to be bought .a str. ) function to retun the information about the circle including the radius, surface area, paint required and cost of paint required Test your class definition by creating three circles with different radi and output the radius, the surface area to be be bought for each circle pained,the amount of paint to be bough and the cos of pains to For example, if the input for the radius of each of the three circles is: 5, 10, and 15, then the ourpur should be as follows CIRCLE Radius: 5.00 ft, Surface area: 78.54 sq ft Required paint:8 litres, Paint cost: $120.00 CIRCLE: Radius: 1e.68 ft, Surface area: 314.16 sq ft Required paint: 29 litres, Paint cost: $435.8e CIRCLE3: Required paint: 65 litres, Paint cost: $975.00

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_2

Step: 3

blur-text-image_3

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

More Books

Students also viewed these Databases questions

Question

find all matrices A (a) A = 13 (b) A + A = 213

Answered: 1 week ago

Question

Provide examples of KPIs in Human Capital Management.

Answered: 1 week ago

Question

What are OLAP Cubes?

Answered: 1 week ago