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
A __________ is an added note showing additional or more specific information.
xxMikexx [17]

Answer:

awnsers should be added to know to show additional

8 0
3 years ago
5) Calculate the LMC wal thickness of a pipe and tubing with OD as 35 + .05 and ID as 25 + .05 A) 4.95 B) 5.05 C) 10 D) 15.025
padilas [110]

Answer:

B) 5.05

Explanation:

The wall thickness of a pipe is the difference between the diameter of outer wall and the diameter of inner wall divided by 2. It is given by:

Thickness of pipe = (Outer wall diameter - Inner wall diameter) / 2

Given that:

Inner diameter = ID = 25 ± 0.05, Outer diameter = OD = 35 ± 0.05

Maximum outer diameter = 35 + 0.05 = 35.05

Minimum inner diameter = 25 - 0.05 = 24.95

Thickness of pipe = (maximum outer wall diameter - minimum inner wall diameter) / 2 = (35.05 - 24.95) / 2 = 5.05

or

Thickness = (35 - 25) / 2 + 0.05 = 10/2 + 0.05 = 5 + 0.05 = 5.05

Therefore the LMC wall thickness is 5.05

6 0
3 years ago
Read 2 more answers
DRIVERS ED
forsale [732]

Answer:

b

Explanation:

only if there signal is turned on

8 0
3 years ago
Read 2 more answers
Air-conditioners consume a significant amount of electrical energy in buildings. Split air conditioner is a unitary system where
nydimaria [60]

Answer:

Evaporator,Compressor,Condensor ,Expanding valve

Explanation:

Split air conditioning :

  Split air conditioning means that, condensor unit or some time called outdoor unit is split from evaporator.It means that evaporator and condensor are placed at some distance.

The four component of split air conditioning system are as follows

1.Evaporator

 It absorb heat from room and produces the cooling effect.

2.Compressor

 It compresses the refrigerant which exits from evaporator.

3.Condensor

 It rejects the heat and cool the evaporator.

4.Expanding valve

  It allows to refrigerant to cool up to evaporator pressure.

6 0
3 years ago
What should you release to re-establish vehicle control and tire traction?
MrMuchimi

Answer: The accelerator and the brakes.

6 0
2 years ago
Other questions:
  • According to the amortization table, Demarco and Tanya will pay a total of in interest over the life of their loan.
    6·2 answers
  • A surveyor is trying to find the height of a hill . he/she takes a sight on the top of the hill and find that the angle of eleva
    12·1 answer
  • Thermal energy storage systems commonly involve a packed bed of solid spheres, through which a hot gas flows if the system is be
    13·1 answer
  • Two kilograms of air in a piston-cylinder assembly undergoes an isothermal process from an initial state of 200K, 300kPa to 600k
    8·1 answer
  • A 1000 KVA three phase transformer has a secondary voltage of 208/120. What is the secondary full load amperage?
    9·1 answer
  • Water flowing through both a small pipe and a large pipe can fill a water tank in 4 hours. Water flowing through the small pipe
    5·1 answer
  • In the planning process of the product development life cycle what is it important to inventory
    7·1 answer
  • The formation of faults in Earth's crust is an effect. What causes faults to form in the crust? Global Positioning System sensor
    9·1 answer
  • Determine the resistance of 100m of copper cable whose cross-sectional area is 1.5mm2​
    6·1 answer
  • Engineers designed a motorcycle helmet from a long-lasting and safe material that protects the wearer from accidents and excessi
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!