Advertisement
Guest User

Untitled

a guest
Jan 25th, 2020
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.51 KB | None | 0 0
  1. package Model;
  2.  
  3.  
  4. public class OffensiveLine extends FootballPlayer {
  5.    
  6.     /**FootballPlayer center;
  7.     FootballPlayer offensiveGuard;
  8.     FootballPlayer offensiveTackle;
  9.     *
  10.     * This is the requirement for the class, but can't get it to work??
  11.     * No errors when I run with Strings...
  12.     */
  13.    
  14.     String center;
  15.     String offensiveGuard;
  16.     String offensiveTackle;
  17.    
  18.     OffensiveLine(){
  19.         center = "Center";
  20.         offensiveGuard = "Offensive Guard";
  21.         offensiveTackle = "Offensive Tackle";
  22.     }
  23.    
  24.     OffensiveLine(String a, Height b, int c, String d, String e, int f, String g, String pos1, String pos2, String pos3){
  25.        
  26.         super(a, b, c, d, e, f, g);
  27.        
  28.         center = pos1;
  29.         offensiveGuard = pos2;
  30.         offensiveTackle = pos3;    
  31.     }
  32.    
  33.     //Not sure really where to go from here.. Below is just guess work based on what I have managed so far in the other files...
  34.    
  35.     String setPostion1(){
  36.         return center;
  37.     }
  38.    
  39.     String setPosition2(){
  40.         return offensiveGuard;
  41.     }
  42.    
  43.     String setPosition3(){
  44.         return offensiveGuard;
  45.     }
  46.    
  47.    
  48.     //This isn't right.. but I don't know how to call each different weight into here...
  49.     public int averageWeight(){
  50.         int average;
  51.         average = weight + weight + weight / 3;
  52.        
  53.         return average;
  54.     }
  55.    
  56.     @Override
  57.     String getInfo(){
  58.         return super.getInfo() + getPosition();
  59.     }
  60.  
  61.    
  62. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement