WhiZTiM

Fun Java Model_of_Nig_court

Jun 27th, 2013
361
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 2.09 KB | None | 0 0
  1. class Nig_Court
  2. {
  3.     long _stolen_cash;
  4.     boolean bought_judgement;
  5.     public Nig_Court(long stolen_cash)
  6.     {
  7.         bought_judgement = false;
  8.         _stolen_cash = stolen_cash;
  9.     }
  10.    
  11.     public final void buy_judgement(long bribe)
  12.     {
  13.         //if bribe is > N200,000 and its also greater than 4% of stolen_cash
  14.         if((bribe > 200000) && (bribe > (_stolen_cash * 4 / 100)))
  15.         {
  16.             bought_judgement = true;
  17.         }
  18.     }
  19.    
  20.     public final String get_Verdict()
  21.     {
  22.         if(bought_judgement)
  23.         {
  24.             return "Case dismised for lack of evidence";
  25.         }
  26.         // < N10... doesnt deserve to live
  27.         else if(_stolen_cash < 10)
  28.         {
  29.             return "Jailed for life";
  30.         }
  31.         //N10 to N5,000 :
  32.         else if(_stolen_cash >= 10 && _stolen_cash < 5000)
  33.         {
  34.             return "Jailed for 70 years with hard labor";
  35.         }
  36.         //N5,000 to N100,000 :
  37.         else if(_stolen_cash >= 5000 && _stolen_cash < 100000)
  38.         {
  39.             return "Jailed for 15 years with mild labor";
  40.         }
  41.         //N100,000 to N1m :
  42.         else if(_stolen_cash >= 100000 && _stolen_cash < 1000000)
  43.         {
  44.             return "Jailed for 6 years without labor";
  45.         }
  46.         //N1m to N30m : Sizeable thief
  47.         else if(_stolen_cash >= 1000000 && _stolen_cash < 30000000)
  48.         {
  49.             return "Jailed for 2 months with option of 10% fine: "
  50.                     + Long.toString(_stolen_cash * 10 / 100);
  51.         }
  52.         //N30m to N500m : big thief
  53.         else if(_stolen_cash >= 30000000 && _stolen_cash <= 500000000)
  54.         {
  55.             return "Rest for 3 weeks Sir/Ma with option of 6% fine: "
  56.                     + Long.toString(_stolen_cash * 6 / 100);
  57.         }
  58.        
  59.         //#Oga @ The Top: ahhh, somebody with goodwill for the nation
  60.         //_stolen_cash > N500m ...
  61.         else
  62.         {
  63.             return "Discharged and Acquitted!... Sorry for wasting your ample time"
  64.                     + "we thank you for your Patience with us Sir/Ma";
  65.         }
  66.     }
  67. }
Add Comment
Please, Sign In to add comment