subject

Problem: Shapes 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. 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: 2

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 22:30
What are compression artifacts? 1) visible defects in the picture caused by the nature of the compression algorithm. 2) numbers that tell a web server how much to compress a picture for faster transmission. 3) invisible defects in the picture preserved by lossless compression. 4) numbers that tell a photo editing program how much to compress a picture for faster transmission.
Answers: 3
question
Computers and Technology, 22.06.2019 10:30
Auniversity wants to install a client-server network. which feature do you think is important for them as they set up the network? sending email blocking multiple people to use the same file low security low set up cost limited access to files
Answers: 1
question
Computers and Technology, 23.06.2019 06:00
How can a user delete a drawing object
Answers: 1
question
Computers and Technology, 23.06.2019 06:30
You are consulting for a beverage distributor who is interested in determining the benefits it could achieve from implementing new information systems. what will you advise as the first step?
Answers: 1
You know the right answer?
Problem: Shapes Implement a program that manages shapes. Implement a class named Shape with a method...
Questions