subject
Engineering, 28.05.2021 14:20 dhernandez081

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.

ansver
Answers: 1

Another question on Engineering

question
Engineering, 04.07.2019 16:10
An electrical motor raises a 50kg load at a construct velencity .calculate the power of the motor, if it takes 40sec to raise the load through a height of 24m(take g =9.8n/g)
Answers: 2
question
Engineering, 04.07.2019 18:20
Amixture of slurry and mud is to be pumped through a horizontal pipe of diameter 500 mm. the fluid behaves as a bingham plastic with a yield stress of 30 pa and viscosity 0.04 pa.s. describe the effects of the shear stress through a transverse section of the pipe by plotting the variation in shear stress and velocity profile: (i) just before the slurry starts to move (ii) as the slurry flows when the pressure gradient is double that in part (i)
Answers: 3
question
Engineering, 04.07.2019 19:10
What are the major differences between injection molding and extrusion?
Answers: 2
question
Engineering, 06.07.2019 02:30
On solidification from a melt, the polymer polyethylene forms a semi-crystalline spherulite structure. (i) sketch an individual spherulite and label the amorphous and crystalline regions. (ii) draw a schematic to show the changes in specific volume with temperature during cooling from the melt, comparing it to the theoretical extremes of fully crystalline and fully amorphous (indicate tm and tg)
Answers: 2
You know the right answer?
Implement a program that manages shapes. Implement a class named Shape with a method area() which re...
Questions
question
Mathematics, 16.09.2020 01:01
question
Mathematics, 16.09.2020 01:01
question
Mathematics, 16.09.2020 01:01
question
Mathematics, 16.09.2020 01:01
question
English, 16.09.2020 01:01
question
Mathematics, 16.09.2020 01:01
question
Mathematics, 16.09.2020 01:01
question
Computers and Technology, 16.09.2020 01:01
question
Mathematics, 16.09.2020 01:01
question
Mathematics, 16.09.2020 01:01
question
Mathematics, 16.09.2020 01:01
question
Mathematics, 16.09.2020 01:01
question
Social Studies, 16.09.2020 01:01
question
Mathematics, 16.09.2020 01:01
question
Mathematics, 16.09.2020 01:01
question
Mathematics, 16.09.2020 01:01
question
Mathematics, 16.09.2020 01:01
question
Mathematics, 16.09.2020 01:01
question
Mathematics, 16.09.2020 01:01
question
Mathematics, 16.09.2020 01:01
Questions on the website: 13722363