Add files via upload

This commit is contained in:
soufiane-cheouati 2019-02-03 20:44:04 +00:00 committed by GitHub
parent f76d6bd668
commit 565f69ecf3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 10 additions and 6 deletions

View File

@ -1,7 +1,5 @@
package com.baeldung.markerinterface;
public interface DeletableShape {
double getArea();
public interface DeletableShape extends Shape {
double getCircumference();
}

View File

@ -1,6 +1,6 @@
package com.baeldung.markerinterface;
public class Rectangle implements Deletable {
public class Rectangle implements DeletableShape {
private double width;
private double height;

View File

@ -0,0 +1,6 @@
package com.baeldung.markerinterface;
public interface Shape {
double getArea();
double getCircumference();
}

View File

@ -3,7 +3,7 @@ package com.baeldung.markerinterface;
public class ShapeDao {
public boolean delete(Object object) {
if (!(object instanceof Deletable)) {
if (!(object instanceof DeletableShape)) {
return false;
}
// Calling the code that deletes the entity from the database