Consider the following UML class diagram Convert it into an
Consider the following UML class diagram. Convert it into an equivalent Java class. (Do not worry about inclusions. You may omit function bodies, or leave them blank.)
Solution
SpaceShip.java
public class SpaceShip {
private int x;
private int y;
private double heading;
public void fireLaser(){
}
public void target(SpaceShip t){
}
public void flyTo(Coordinate dest){
}
}
