/** * Created on 26.03.2005 * * @author Jens Guenther */ package de.unirostock.Builder.example; public abstract class Ship { /** * * @uml.property name="itsHull" * @uml.associationEnd aggregation="composite" inverse="ship:de.unirostock.Builder.example.Hull" multiplicity="(1 1)" */ private Hull itsHull; /** * * @uml.property name="itsEngine" * @uml.associationEnd aggregation="composite" inverse="ship:de.unirostock.Builder.example.Engine" multiplicity="(1 1)" */ private Engine itsEngine; /** * @param engine The engine to set. */ protected void setEngine( Engine engine ) { itsEngine = engine; } /** * @param hull The hull to set. */ protected void setHull( Hull hull ) { itsHull = hull; } /** * @return Returns the material. */ public String getMaterialType() { if( itsHull == null ) return ""; return itsHull.getMaterialType(); } /** * @return Returns the power. */ public float getPower() { if( itsEngine == null ) return 0; return itsEngine.getPower(); } }