Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Captain extends UltimatePlayer {
- private boolean type;
- private String typeofc;
- public Captain(String first, String last, String position, boolean type) {
- super(first, last, position);
- if(type == true) {
- typeofc = "offense";
- }
- if(type == false) {
- typeofc = "defense";
- }
- }
- public String toString() {
- return super.toString() + '\n' + " Captain: " + typeofc ;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement