Android Build an Interactive Story App The Model-View-Presenter Pattern Creating a Data Model

prosper nyamukondiwa
prosper nyamukondiwa
656 Points

add the setter

where am l getting it wrong , it kept bumming pliz help

Spaceship.java
public class Spaceship{ public String shipType;

public String getShipType(){return shipType;}

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

ShipType=setShipType;}
}


 }

1 Answer

Livia Galeazzi
PRO
Livia Galeazzi
Java Web Development Techdegree Graduate 19,900 Points

Your setter method should have a parameter, so you can pass the new value you want to set.