Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public double totalPrice() {
- System.out.println("pris:" + participant.name);
- double days = ChronoUnit.DAYS.between(getArrivalDate(), getDepartureDate().plusDays(1));
- double price = 0;
- if (!participant.isLecturer()) {
- price = (conference.getPrice() * days);
- }
- System.out.println("pris efter foredragsholder" + price);
- if (hotel != null) {
- if (companion != null) {
- price += hotel.getPriceRoom2() * (days - 1);
- } else {
- price += hotel.getPriceRoom1() * (days - 1);
- }
- }
- System.out.println("Pris efter hotel" + price);
- if (companion != null) {
- price += companion.excurtionPrice();
- }
- System.out.println("Pris efter udflugt" + price);
- for (Extra e : extraList) {
- price += e.getAppendixPrice() * (days -1);
- }
- System.out.println("Pris efter extras" + price);
- return price;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement