Declares several circle objects

Assignment Help Basic Computer Science
Reference no: EM13659415

Create a class named Circle with field names radius, diameter, and area. Include a constructor that sets the radius to 1 and calculates the other two values. Include methods named setRadius() and getRadius(). The setRadius() method not only sets the radius, but calculates the other two values (as you know, the diameter of a circle is twice the radius, the area of a circle is pi multiplied by the square of the radius). Save class as Circle.java.

Create a class named TestCircle whose main method() declares several Circle objects. Using setRadius() method, assign one circle a small radius value (code a user input making use of Scanner of JOptionPane), and assign another a larger radius value (to be an input by a user as well). Do not assign a value to the radius of the third circle; instead retain the value assigned at object construction. Display all the values for three Circle objects. Save the class as TestCircle.java.

Note: Create an UML class diagram prior to coding the application.

Compile, run, and check the results. Submit the following:

1.The source file (If more than one file has been created, zip them into one .zip file for posting.)

2.An MS .doc file with explanations/comments of your solution and the results of a test run, including a screen shot picture

3.The UML class diagram of the application should be included in the deliverable as a part of the MS .doc above, or as a separate file

We are using jGrasp.

Reference no: EM13659415

Questions Cloud

How much work was done by the ball : A 0.150 kilogram ball that is thrown at a velocity of 30.0 m\s hits a wall and bounces back in the opposite direction by a speed of25.0m\s. How much work was done by the ball?
Complete a swot analysis for the selected industry : Complete a SWOT analysis for the selected industry. The SWOT analysis allows a business to understand how a competitor is positioned in the environment by assessing its strengths, weaknesses, opportunities, and threats.
How much kinetic energy is lost in the system : A dartboard with a mass of 2.2kg is suspended from the ceiling such that it is originally at rest. A 0.030kg dart is thrown at the dartboard with a velocity of 1.2m\s. After the dart hits the dartboard, the dart and the board initially move by a velo..
Discover the energy delivered to the circuit : A 8.00 Ω resistor, 10.0 mH inductor, and a 130 µF capacitor are connected in series to a 40.0 V (rms) source having variable frequency. Discover the energy delivered to the circuit through one period if the operating frequency is double the resonance..
Declares several circle objects : Declares several Circle objects
Support cable runs from the top of the boom to the tractor : A wrecking ball (weight = 4400 N)is supported by a boom, which might be assumed to be uniform and has a weight of 3000 N. As the drawing shows, a support cable runs from the top of the boom to the tractor.
What is magnitude of the earths magnetic field at that point : A 500 turn coil 15.0cm in diameter is originally aligned so that its axis is parallel to the Earth's magnetic fields. In 2.77ms, the coil is flipped so that its axis is perpendicular to the Earth's magnetic field. If an average voltage of 0.166V is t..
Two main functions of user accounts in a network : What are the two main functions of user accounts in a network?
Percentage of unique sample does searched volume represent : You are provided with a 1 cm3 of biological sample from which 0.1 mm thin sections are cut. A search for virus cells at a magnification of 100,000 has been proposed. The fluorescent screen on which the image is to be projected has a diameter of 15 cm..

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Identifies the cost of computer

identifies the cost of computer components to configure a computer system (including all peripheral devices where needed) for use in one of the following four situations:

  Input devices

Compare how the gestures data is generated and represented for interpretation in each of the following input devices. In your comparison, consider the data formats (radio waves, electrical signal, sound, etc.), device drivers, operating systems suppo..

  Cores on computer systems

Assignment : Cores on Computer Systems:  Differentiate between multiprocessor systems and many-core systems in terms of power efficiency, cost benefit analysis, instructions processing efficiency, and packaging form factors.

  Prepare an annual budget in an excel spreadsheet

Prepare working solutions in Excel that will manage the annual budget

  Write a research paper in relation to a software design

Research paper in relation to a Software Design related topic

  Describe the forest, domain, ou, and trust configuration

Describe the forest, domain, OU, and trust configuration for Bluesky. Include a chart or diagram of the current configuration. Currently Bluesky has a single domain and default OU structure.

  Construct a truth table for the boolean expression

Construct a truth table for the Boolean expressions ABC + A'B'C' ABC + AB'C' + A'B'C' A(BC' + B'C)

  Evaluate the cost of materials

Evaluate the cost of materials

  The marie simulator

Depending on how comfortable you are with using the MARIE simulator after reading

  What is the main advantage of using master pages

What is the main advantage of using master pages. Explain the purpose and advantage of using styles.

  Describe the three fundamental models of distributed systems

Explain the two approaches to packet delivery by the network layer in Distributed Systems. Describe the three fundamental models of Distributed Systems

  Distinguish between caching and buffering

Distinguish between caching and buffering The failure model defines the ways in which failure may occur in order to provide an understanding of the effects of failure. Give one type of failure with a brief description of the failure

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd