View Single Post
Old Apr 15th, 2005, 9:26 AM   #3
cwl157
Professional Programmer
 
Join Date: Feb 2005
Posts: 343
Rep Power: 4 cwl157 is on a distinguished road
your right i dont get the exception every time and here is my battleship class the variables are sent down from the ship class...

Ship class
abstract public class Ship
{
    String name;
    int size;
    int hits;
    
    /** Creates a new instance of Ship */
    public Ship(String name, int size, int hits)
    {
        this.name = name;
        this.size = size;
        this.hits = hits;
    }
}

here is the BattleShip class
public class BattleShip extends Ship
{
    /** Creates a new instance of BattleShip */
    public BattleShip(String name, int size, int hits)
    {
        super(name, size, hits);
    }
    
}
thanks
cwl157 is offline   Reply With Quote