Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (studentsGroup.equals("girls") || (studentsGroup.equals("boys"))) {
- switch (season) {
- case "Spring":
- if (studentsNumber < 10) {
- tripTotalPrice = nightsStand * studentsNumber * 7.20;
- } else if (studentsNumber >= 10 && studentsNumber < 20) {
- tripTotalPrice = nightsStand * studentsNumber * 7.20;
- tripTotalPrice = tripTotalPrice - (tripTotalPrice * 0.05);
- } else if (studentsNumber >= 20 && studentsNumber < 50) {
- tripTotalPrice = nightsStand * studentsNumber * 7.20;
- tripTotalPrice = tripTotalPrice - (tripTotalPrice * 0.15);
- } else if (studentsNumber >= 50) {
- tripTotalPrice = nightsStand * studentsNumber * 7.20;
- tripTotalPrice = tripTotalPrice - (tripTotalPrice * 0.50);
- }
- break;
- case "Winter":
- if (studentsNumber < 10) {
- tripTotalPrice = nightsStand * studentsNumber * 9.60;
- } else if (studentsNumber >= 10 && studentsNumber < 20) {
- tripTotalPrice = nightsStand * studentsNumber * 9.60;
- tripTotalPrice = tripTotalPrice - (tripTotalPrice * 0.05);
- } else if (studentsNumber >= 20 && studentsNumber < 50) {
- tripTotalPrice = nightsStand * studentsNumber * 9.60;
- tripTotalPrice = tripTotalPrice - (tripTotalPrice * 0.15);
- } else if (studentsNumber >= 50) {
- tripTotalPrice = nightsStand * studentsNumber * 9.60;
- tripTotalPrice = tripTotalPrice - (tripTotalPrice * 0.50);
- }
- break;
- case "Summer":
- if (studentsNumber < 10) {
- tripTotalPrice = nightsStand * studentsNumber * 15;
- } else if (studentsNumber < 20) {
- tripTotalPrice = nightsStand * studentsNumber * 15;
- tripTotalPrice = tripTotalPrice - (tripTotalPrice * 0.05);
- } else if (studentsNumber < 50) {
- tripTotalPrice = nightsStand * studentsNumber * 15;
- tripTotalPrice = tripTotalPrice - (tripTotalPrice * 0.15);
- } else {
- tripTotalPrice = nightsStand * studentsNumber * 15;
- tripTotalPrice = tripTotalPrice - (tripTotalPrice * 0.50);
- }
- break;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement