Android Build an Interactive Story App The Model-View-Presenter Pattern Adding a Custom Constructor

Now add a second constructor that takes a String parameter. Use this parameter to update shipType to a specific type of

Now add a second constructor that takes a String parameter. Use this parameter to update shipType to a specific type of spaceship.

Spaceship.java
class Spaceship {
    public String shipType;

    public String getShipType() {
      return shipType;
    }

    public void setShipType(String shipType) {
      this.shipType = shipType;
    }

  public Spaceship(){
  shipType = "SHUTTLE";

  }

  public Spaceship(String shipType){

    this.shipType = spipType;

}