kmahadev

Incomplete TimeSheet Starter

Dec 14th, 2012
43
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.07 KB | None | 0 0
  1. import java.util.*;
  2. import java.lang.*;
  3.  
  4. public class TestTimeSheet {
  5.  
  6. /**
  7. * @param args
  8. */
  9. public static void main(String[] args) {
  10. // TODO Auto-generated method stub
  11. /*String s1 = "John, Susie, Mark, Jack, Jill";
  12. String [] charArray;
  13. charArray = s1.split(",");
  14. System.out.println(charArray[1]);*/
  15.  
  16. Scanner input = new Scanner(System.in);
  17. //==========================================
  18.  
  19. int location;
  20. double rate;
  21. String times[] = new String[15];
  22.  
  23. times = input.nextLine().replace(" ", "").split(",");
  24. location = Integer.parseInt(times[0]);
  25.  
  26. //if ( (100 <= location) && (location <= 199) ) {
  27. // rate = 10.0;
  28. // else if ()
  29. if(location >= 500)
  30. rate = 8.0;
  31. else if (location >= 400)
  32. rate = 13.50;
  33. else if (location >= 300)
  34. rate = 9.25;
  35. else if (location >= 200)
  36. rate = 9.25;
  37. else if (location >= 100)
  38. rate = 10;
  39.  
  40.  
  41.  
  42.  
  43.  
  44. for(int i = 0; i < times.length; i++) {
  45. //System.out.print(" " + times[i]);
  46. //System.out.println(i + ":" + times[i]);
  47.  
  48. }
  49.  
  50.  
  51. }
  52.  
  53. }
Advertisement
Add Comment
Please, Sign In to add comment