APlusGrades

Not Rated (0)

$15/per page/Negotiable

About APlusGrades

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,Foreign Languages,Geography,Geology,Health & Medical,HR Management,Law,Management,Physics,Programming,Science,Statistics Hide all
Teaching Since: Jul 2017
Last Sign in: 364 Weeks Ago, 3 Days Ago
Questions Answered: 1850
Tutorials Posted: 1850

Education

  • Graduate in Biology and Nutrition, MBA Finance
    Florida State University
    Aug-2000 - Jul-2007

Experience

  • Ass. Relationship Manager
    Penn-Florida
    Mar-2009 - Feb-2016

Category > Computer Science Posted 18 Jul 2017 My Price 12.00

public class RetailItem

1. Write a Circle class that has the following fields:
   -radius: a double
   -PI: a double (DO NOT include Pl as an attribute - use the constant from the Math class (check the Math API)

2. The class should have the following methods:
-Constructor.  Accepts the radius of the circle as an argument
-Constructor.  A no-argument constructor that sets the radius field to 0.0
-setRadius. A mutator method for the radius field.
-getRadius. A accessor method for the radius field.
-getArea. Returns the area of the circle, which is calculates as area = PI * radius * radius.
-getDiameter. Returns the diameter of a circle, which is calculated as diameter = radius * 2.
-getCircumference. Returns the circumference of a circle, which is calculated as circumference = 2 * PI * radius
-toString(). Displays the current state of the object, include in the state the radius, diameter, area, and circumference of the circle 
(DO NOT create attributes for the diameter, area and 
circumference).

3. Write a RetailItemDriver class and include the following items:
-two Circle objects (this is read in from the retailItems.txt file)
-determineLargerCircle() - this method will display the larger of two circle objects (pass the circle objects into this method from main() )
-getACircle() - this method will read the radius of the circle from the data file (one by one), call this method twicefrom main() and return the circle object back to main()
-displayACircle() - this will display the current state of the circle object, including the 
radius, diameter, area, and circumference.

---
So I have attached the beginnings of my Java code for RetailItem & RetailItemDriver but I can't quite figure out how to implement the methods: displayACircle(), getACircle(), and determineLargerCircle().  I am also confused on how to "read" in data from the file.

Attachments:

Answers

Not Rated (0)
Status NEW Posted 18 Jul 2017 05:07 PM My Price 12.00

Hel-----------lo -----------Sir-----------/Ma-----------dam----------- Â-----------  -----------Tha-----------nk -----------you----------- fo-----------r u-----------sin-----------g o-----------ur -----------web-----------sit-----------e a-----------nd -----------acq-----------uis-----------iti-----------on -----------of -----------my -----------pos-----------ted----------- so-----------lut-----------ion-----------.Pl-----------eas-----------e p-----------ing----------- me----------- on----------- ch-----------at -----------I a-----------m Â----------- on-----------lin-----------e o-----------r i-----------nbo-----------x m-----------e a----------- me-----------ssa-----------ge -----------I

Not Rated(0)