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
Can you solve this question​
Alecsey [184]

Answer:

eojcjksjsososisjsiisisiiaodbjspbcpjsphcpjajosjjs ahahhahahahahahahahahahahahahhhahahahaahahhahahahahaahahahahaha

6 0
3 years ago
Read 2 more answers
(25%) A well-insulated compressor operating at steady state takes in air at 70 oF and 15 psi, with a volumetric flow rate of 500
lubasha [3.4K]

Answer:

You can look it up

Explanation: if you don't know what it is look it up on .

6 0
3 years ago
When passing another vehicle, when is it acceptable to drive over the
miss Akunina [59]

Answer:

Under no circumstances

Explanation:

I'm not 100% sure why, but I remember hearing that you're not suposed to go over the speed limit no matter what

7 0
3 years ago
Read 2 more answers
What are the inputs, outputs and side effects of a PSP?
Kipish [7]

Answer:

Side effects - sudden loss of balance/ repeated falls

Outputs - sever sickness and could me factual

Inputs/corrections of this- medications and experimental treatments to help slow the process of deterioration

5 0
3 years ago
Showing all of your work and algebra,generate an approximate expression for T as a function ofthe other variables. (b) Explain w
shusha [124]

Answer:

Following the ways of dealing with incomplete questions, i was able to get the complete question, please look at the attachment for ans.

5 0
4 years ago
Other questions:
  • A First Stage in a turbine receives steam at 10 MPa, 800 C with an exit pressure of 800 KPa. Assume the stage is adiabatic and r
    5·1 answer
  • What does WCS stand for? A. Western CAD System B. Worldwide Coordinate Sectors C. World Coordinate System D. Wrong CAD Settings
    10·1 answer
  • An equilibrium mixture of 3 kmol of CO, 2.5 kmol of O2, and 8 kmol of N2 is heated to 2600 K at a pressure of 5 atm. Determine t
    7·1 answer
  • What is the Principle of Entropy Increase?
    9·1 answer
  • An alloy is evaluated for potential creep deformation in a short-term laboratory experiment. The creep rate (ϵ˙) is found to be
    8·1 answer
  • Is a unit of measurement for angles
    15·1 answer
  • if when you put your shirt in your pants, your shirt is tucked, does that mean when your shirt is over your pants, your pants ar
    6·2 answers
  • 1. A hydro facility operates with an elevation difference of 50 m and a flow rate of 500 m3/s. If the rotational speed is 90 RPM
    12·1 answer
  • GMA MIG weiding is a
    7·1 answer
  • Question is written in following attached screenshot.
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!