Advertisement
apez1

Assignment 3: Ultimate Frisbee - Coach Class Submission

Jan 23rd, 2019
501
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.36 KB | None | 0 0
  1. package ultimateFrisbee;
  2.  
  3. public class Coach extends Person {
  4.  
  5.     private String role;
  6.    
  7.    
  8.     public Coach(String first, String last, String r){
  9.        
  10.         super(first, last);
  11.         role = r;
  12.        
  13.        
  14.     }
  15.    
  16.     public String toString() {
  17.        
  18.         String output1 = null ;
  19.        
  20.         output1 = super.toString() + '\n' + "   Role: " + role;
  21.        
  22.         return output1;
  23.        
  24.     }
  25.    
  26.    
  27.    
  28.    
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement