Advertisement
SensaBG

Untitled

Jun 16th, 2024
30
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.73 KB | None | 0 0
  1. if (studentsGroup.equals("girls") || (studentsGroup.equals("boys"))) {
  2.  
  3. switch (season) {
  4. case "Spring":
  5.  
  6. if (studentsNumber < 10) {
  7. tripTotalPrice = nightsStand * studentsNumber * 7.20;
  8. } else if (studentsNumber >= 10 && studentsNumber < 20) {
  9. tripTotalPrice = nightsStand * studentsNumber * 7.20;
  10. tripTotalPrice = tripTotalPrice - (tripTotalPrice * 0.05);
  11. } else if (studentsNumber >= 20 && studentsNumber < 50) {
  12. tripTotalPrice = nightsStand * studentsNumber * 7.20;
  13. tripTotalPrice = tripTotalPrice - (tripTotalPrice * 0.15);
  14. } else if (studentsNumber >= 50) {
  15. tripTotalPrice = nightsStand * studentsNumber * 7.20;
  16. tripTotalPrice = tripTotalPrice - (tripTotalPrice * 0.50);
  17. }
  18.  
  19. break;
  20.  
  21.  
  22. case "Winter":
  23. if (studentsNumber < 10) {
  24. tripTotalPrice = nightsStand * studentsNumber * 9.60;
  25. } else if (studentsNumber >= 10 && studentsNumber < 20) {
  26. tripTotalPrice = nightsStand * studentsNumber * 9.60;
  27. tripTotalPrice = tripTotalPrice - (tripTotalPrice * 0.05);
  28. } else if (studentsNumber >= 20 && studentsNumber < 50) {
  29. tripTotalPrice = nightsStand * studentsNumber * 9.60;
  30. tripTotalPrice = tripTotalPrice - (tripTotalPrice * 0.15);
  31. } else if (studentsNumber >= 50) {
  32. tripTotalPrice = nightsStand * studentsNumber * 9.60;
  33. tripTotalPrice = tripTotalPrice - (tripTotalPrice * 0.50);
  34. }
  35.  
  36. break;
  37.  
  38.  
  39. case "Summer":
  40. if (studentsNumber < 10) {
  41. tripTotalPrice = nightsStand * studentsNumber * 15;
  42. } else if (studentsNumber < 20) {
  43. tripTotalPrice = nightsStand * studentsNumber * 15;
  44. tripTotalPrice = tripTotalPrice - (tripTotalPrice * 0.05);
  45. } else if (studentsNumber < 50) {
  46. tripTotalPrice = nightsStand * studentsNumber * 15;
  47. tripTotalPrice = tripTotalPrice - (tripTotalPrice * 0.15);
  48. } else {
  49. tripTotalPrice = nightsStand * studentsNumber * 15;
  50. tripTotalPrice = tripTotalPrice - (tripTotalPrice * 0.50);
  51. }
  52. break;
  53. }
  54.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement