SophiaPretty

(5)

$14/per page/Negotiable

About SophiaPretty

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Accounting,Algebra See all
Accounting,Algebra,Applied Sciences,Architecture and Design,Art & Design,Biology,Business & Finance,Calculus,Chemistry,Communications,Computer Science,Economics,Engineering,English,Environmental science,Essay writing Hide all
Teaching Since: Jul 2017
Last Sign in: 304 Weeks Ago, 3 Days Ago
Questions Answered: 15833
Tutorials Posted: 15827

Education

  • MBA,PHD, Juris Doctor
    Strayer,Devery,Harvard University
    Mar-1995 - Mar-2002

Experience

  • Manager Planning
    WalMart
    Mar-2001 - Feb-2009

Category > Computer Science Posted 08 Jan 2018 My Price 10.00

radius to a value which is passed to the constructor.

Circle:

a) Write a class to represent a Circle called BasicCircle. This should include the following:  
i). A single attribute named radius. 

ii). A default constructor which will set the value of radius to 1.

iii). A general constructor which should set the radius to a value which is passed to the constructor.

iv). Getter and setter methods for the radius attribute.

v). A method called getCircumference to calculate and return the circumference of the Circle to 2 decimal places (see appendix). You should use Math.PI in this method. 

vi). A method called getArea to calculate and return the area of the Circle to 3 decimal places (see appendix). You should use Math.PI in this method.  

 

b) Write a main method in a new class called TestBasicCircle and in this method: 
i). Create an array of 3 BasicCircle objects. 

ii). The radius of each circle should be set by user input. 

iii). Print the radius of each circle object (see sample output below)

iv). Use the getCircumference()method and print the circumference of each circle.

v). Use the getArea() method and print the area of each circle. (see sample output below) 

 

Attachments:

Answers

(5)
Status NEW Posted 08 Jan 2018 01:01 PM My Price 10.00

-----------  ----------- H-----------ell-----------o S-----------ir/-----------Mad-----------am ----------- Th-----------ank----------- yo-----------u f-----------or -----------you-----------r i-----------nte-----------res-----------t a-----------nd -----------buy-----------ing----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n. -----------Ple-----------ase----------- pi-----------ng -----------me -----------on -----------cha-----------t I----------- am----------- on-----------lin-----------e o-----------r i-----------nbo-----------x m-----------e a----------- me-----------ssa-----------ge -----------I w-----------ill----------- be----------- qu-----------ick-----------ly

Not Rated(0)