Answered step by step
Verified Expert Solution
Question
1 Approved Answer
//create an abstract Shape class abstract class Shape { static int shapeCount = 0; public Shape() { //shapeCount is incremented every time a new shape
//create an abstract Shape class abstract class Shape { static int shapeCount = 0; public Shape() { //shapeCount is incremented every time a new shape is created shapeCount = shapeCount + 1; } //define abstract methods area(), perimeter(), and getShape() abstract double area(); abstract double perimeter(); //getShape() will return a String that represents a particular shape abstract String getShape(); }
Comparable (3 points) 1. Java has a built-in interface called ComparableStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started