2. Hierarchy of the classes is designed as the following Shape ← Point ← Circle← Cylinder getArea getVolume Shape Point Circle Cylinder 0.0 0.0 0.0 2rr²+ 2πrh 0.0 0.0 0.0 лr²h abstract "Point" "Circle" "Cylinder" getName toString default object implementation [xy] center=[x,y]; radius=r center=[x,y]; radius=r; height = h Class Shape is abstract Point class has x and y coordinates, constructor, accessor,mutators and toString method. ● Circle class has radius, constructor, accessor, mutators, Diameter, Circumeference, Area and toS methods. • Cylinder class has height, accessor, mutator,Area, Volume and toString methods. All shapes have an area and volume. The volume of two dimensional shapes is always zero and dimensional shapes have positive non-zero volume. Implement appropriate methods and class definitions. Write "Test" class and create object of the thre classes Point, Circle and Cylinder. Use array of Shape variables. Show each object's name and data(i
2. Hierarchy of the classes is designed as the following Shape ← Point ← Circle← Cylinder getArea getVolume Shape Point Circle Cylinder 0.0 0.0 0.0 2rr²+ 2πrh 0.0 0.0 0.0 лr²h abstract "Point" "Circle" "Cylinder" getName toString default object implementation [xy] center=[x,y]; radius=r center=[x,y]; radius=r; height = h Class Shape is abstract Point class has x and y coordinates, constructor, accessor,mutators and toString method. ● Circle class has radius, constructor, accessor, mutators, Diameter, Circumeference, Area and toS methods. • Cylinder class has height, accessor, mutator,Area, Volume and toString methods. All shapes have an area and volume. The volume of two dimensional shapes is always zero and dimensional shapes have positive non-zero volume. Implement appropriate methods and class definitions. Write "Test" class and create object of the thre classes Point, Circle and Cylinder. Use array of Shape variables. Show each object's name and data(i
Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
Related questions
Question
use java to run the program of the question below and show the exact ouput of the question
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 5 steps with 2 images
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education