GoConqr has a new look! Let us know what you think.

Notes

Abstract Class Example

joannazhang13 English 1 page

Content of the notes (1)

Page 1

public abstract class Shape implements Comparable

{

private String name;

//constructor

public Shape (String n)

{

name= n;

}

//accessor

public String getName()

{

return name;

}

//methods

public abstract double area();

public abstract double perimeter();

public abstract int compareTo(Shape s);

}

Information

Description
Example of Java abstract class
Created by
joannazhang13 · May 2015
Updated
Feb 20, 2016
Views
58
Rating

Feedback

What is it about?

What do you think of the new look?

How do you like it?