Advertisement
MrsMcLead

APStudent

Jan 5th, 2016
376
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.04 KB | None | 0 0
  1. public abstract class APStudent{
  2.   //email .java file to kmclead@wssd.org
  3.   //in the subject line, instantiate one of you, from the word new
  4.  
  5.   private int hoursOfSleep;
  6.   private boolean isHonest;
  7.   private int stressLevel;
  8.   private String name;
  9.   private boolean isConfused;
  10.  
  11.   public APStudent(int s, boolean h, int sL, String n, boolean c)
  12.   {
  13.   int hoursOfSleep = s;
  14.   boolean isHonest = h;
  15.    int stressLevel = sL;
  16.    String name = n;
  17.    boolean isConfused = c;
  18.    
  19.   }
  20.  
  21.   public String doHomework()
  22.   {
  23.    
  24.     if(stressLevel < 5)
  25.       return "All of homework is done and correct!";
  26.     else if(stressLevel < 10)
  27.       return "I hope McLead doesn't notice that I'm doing my Calc AB Homework.";
  28.     else if (stressLevel < 15)
  29.       return "I'm staying home for a mental health day.";
  30.     else
  31.       return "I don't even notice McLead's typos.";
  32.    
  33.   }
  34.  
  35.   public abstract String procrastination();
  36.  
  37.   public String toString()
  38.   {
  39.    return procrastination() + " " + doHomework();
  40.   }
  41.  
  42.  
  43.  
  44.  
  45. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement