1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
mafiozo [28]
3 years ago
8

Implement a program that manages shapes. Implement a class named Shape with a method area() which returns the double value 0.0.

Implement three derived classes named Rectangle, Square, and Circle. Declare necessary properties in each including getter and setter function and a constructor that sets the values of these properties. Override the area() function in each by calculating the area using the defined properties in that class.Using Java to write a program that repeatedly shows the user a menu to create one of the three main shapes or to print the shapes created so far. If the user selects to create a new shape, the program prompts the user to enter the values for the size of the selected shape. The shape is then stored in an array. If the user selects to print the current shapes, print the name and the total area of each shape to the console.Hint: You may limit the size of the array to 10.
Engineering
1 answer:
djverab [1.8K]3 years ago
3 0

Answer:

Explanation:

The following code was written in Java. It creates classes for each one of the shapes requested and includes all of their variables and the area method, as well as a toString method. Then in the main method, the menu is created which allows the user to enter the shape that they want and if they decide to exit it will print out every shape within the shapes array. Due to technical reasons I have added the code as a txt file below and in the picture you can see the output.

Download txt
<span class="sg-text sg-text--link sg-text--bold sg-text--link-disabled sg-text--blue-dark"> txt </span>
19e97f0877c0f4554bca1f4a163eadac.jpg
You might be interested in
Text that is located between &lt;title &gt;and &lt;/title &gt; appears in the browser's_____​
Vinil7 [7]

Answer:

Tab title

Explanation:

The tab title can be defined as the title that shows up in a browser tab known as page title. The title only has texts, other tags within the texts are not considered.

8 0
3 years ago
WHICH COMPONENT IN A BLOWER MOTOR
bagirrra123 [75]
I think it would be the resistor?
5 0
3 years ago
why are apartments called apartments if there together? and why are buildings called buildings if there already built? hmmmm
kumpel [21]

Answer:huh

U right Even though all the apartments within a single building are indeed stuck together, they are also apart from each other.

For you’re second question That means when the building was not built, at that time it was building, now when it is built we remember the past and give it respect of being built - so a building is called a building when it is already built - well it was building back at that time when it was not built !!!

Explanation:

8 0
3 years ago
Evaluate (204 mm)(0.004 57 kg) / (34.6 N) to three
vesna_86 [32]

Answer:

the evaluation in SI unit will be 2.69\times 10^{-5}sec^{2}

Explanation:

We have evaluate \frac{(204mm\times 0.00457kg)}{34.6N}

We know that 1 mm =10^{-3}m

So 240 mm =204\times 10^{-3}m

Newton can be written as kgm/sec^2

So \frac{(204\times 10^{-3}m)\times 0.00457kg}{34.6kgm/sec^2}=2.69\times 10^{-5}sec^{2}

So the evaluation in SI unit will be 2.69\times 10^{-5}sec^{2}

4 0
3 years ago
The "divide and average" method, an old-time method for approximating the square root of any positive number a, can be formulate
Shalnov [3]

Answer:

<u>note:</u>

find the attachment:

4 0
3 years ago
Other questions:
  • Compare automation and autonomous
    12·1 answer
  • A fatigue test is performed on 69 rotating specimens made of 5160H steel. The measured number of cycles to failure (L in kcycles
    6·1 answer
  • A 3-phase induction motor with 4 poles is being driven at 45 Hz and is running in its normal operating range. When connected to
    12·1 answer
  • A plane wall of thickness 2L = 40 mm and thermal conductivity k = 5 W/m K experiences uniform volumetric heat generation at a ra
    15·1 answer
  • 30POINTS
    15·2 answers
  • Water from an upper tank is drained into a lower tank through a 5 cm diameter iron pipe with roughness 2 mm. The entrance to the
    11·1 answer
  • For the floor plan shown, if a = sm b= 8m, specify type of Load on Beam AHS<br> D<br> B В
    10·1 answer
  • The period of an 800 hertz sine wave is
    10·1 answer
  • Proper handling of blueprints includes which of the following
    5·1 answer
  • Please help me with this question
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!