Advertisement
Guest User

Untitled

a guest
May 23rd, 2017
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.99 KB | None | 0 0
  1. /*
  2.  * To change this template, choose Tools | Templates
  3.  * and open the template in the editor.
  4.  */
  5.  
  6. package roulette;
  7.  
  8. /**
  9.  *
  10.  * @author Southern Trendkiller
  11.  */
  12. public class RouletteGameRecord {
  13.     private String date;
  14.     private boolean outcome;
  15.     private int bet;
  16.     private int gain;
  17.     private int hit;
  18.  
  19.     public RouletteGameRecord(String date, boolean outcome, int bet, int gain)
  20.     {
  21.         this.date = date;
  22.         this.outcome = outcome;
  23.         this.bet = bet;
  24.         this.gain = gain;
  25.     }
  26.  
  27.     public RouletteGameRecord()
  28.     {
  29.     }
  30.    
  31.     @Override
  32.     public String toString()
  33.     {
  34.         String ret = getDate() + " money bet: " + getBet() ;
  35.  
  36.         if(isOutcome())
  37.         {
  38.             ret += " outcome: game won ";
  39.             ret += "money won: " + getGain();
  40.         }
  41.         else
  42.         {
  43.             ret += " outcome: game lost";
  44.         }
  45.  
  46.         return ret;
  47.     }
  48.  
  49.     /**
  50.      * @return the date
  51.      */
  52.     public String getDate() {
  53.         return date;
  54.     }
  55.  
  56.     /**
  57.      * @param date the date to set
  58.      */
  59.     public void setDate(String date) {
  60.         this.date = date;
  61.     }
  62.  
  63.     /**
  64.      * @return the outcome
  65.      */
  66.     public boolean isOutcome() {
  67.         return outcome;
  68.     }
  69.  
  70.     /**
  71.      * @param outcome the outcome to set
  72.      */
  73.     public void setOutcome(boolean outcome) {
  74.         this.outcome = outcome;
  75.     }
  76.  
  77.     /**
  78.      * @return the bet
  79.      */
  80.     public int getBet() {
  81.         return bet;
  82.     }
  83.  
  84.     /**
  85.      * @param bet the bet to set
  86.      */
  87.     public void setBet(int bet) {
  88.         this.bet = bet;
  89.     }
  90.  
  91.     /**
  92.      * @return the gain
  93.      */
  94.     public int getGain() {
  95.         return gain;
  96.     }
  97.  
  98.     /**
  99.      * @param gain the gain to set
  100.      */
  101.     public void setGain(int gain) {
  102.         this.gain = gain;
  103.     }
  104.  
  105.     public int getHit() {
  106.         return hit;
  107.     }
  108.  
  109.     public void setHit(int hit) {
  110.         this.hit = hit;
  111.     }
  112.    
  113. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement