View Single Post
Old 02-21-2013, 06:05 AM   #48237
McLovin
Hall Of Fame
 
McLovin's Avatar
 
Join Date: Jun 2007
Posts: 2,515
Default

Quote:
Originally Posted by sapient007 View Post
packing heat is a base class for NE
Is it a base class or an interface?
So:
Code:
public interface PackingHeat {

    public Boolean isFullyAutomatic();

    public Boolean canBeConcealed();

    public Boolean isLegal();
}
Code:
public class NorthEast implements PackingHeat {
    ...
}
Or:
Code:
public abstract class PackingHeat {

    public abstract Boolean isFullyAutomatic();

    public abstract Boolean canBeConcealed();

    public Boolean isLegal() { return true; }
}
Code:
public class NorthEast extends PackingHeat {
    public Boolean isLegal() { return false; }
    ...
}
__________________
"Nobody beats Vitas Gerulaitis 17 times in a row" -- Vitas Gerulaitis, after beating Jimmy Connors on his 17th try.

Last edited by McLovin : 02-21-2013 at 06:14 AM.
McLovin is offline   Reply With Quote