Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!

class: Event

By: erikblomqvist on Nov 2nd, 2011  |  syntax: Java  |  size: 0.76 KB  |  views: 16  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1.  
  2. /**
  3.  * Write a description of class Event here.
  4.  *
  5.  * @author (your name)
  6.  * @version (a version number or a date)
  7.  */
  8. public class Event
  9. {
  10.     // instance variables - replace the example below with your own
  11.     private String mDescription;
  12.     private int mAffectMood;
  13.  
  14.     /**
  15.      * Constructor for objects of class Event
  16.      */
  17.     public Event(String desc, int affectValue)
  18.     {
  19.         mDescription = desc;
  20.         mAffectMood = affectValue;
  21.     }
  22.    
  23.     public String getDescription()
  24.     {
  25.         return mDescription;
  26.     }
  27.  
  28.     public int getAffectMood()
  29.     {
  30.         return mAffectMood;
  31.     }
  32.  
  33.     public String toString()
  34.     {
  35.         return mDescription + " Ditt humör påverkas med värdet: " + mAffectMood;
  36.     }
  37. }
  38.  
  39.  
clone this paste RAW Paste Data