Page 307 - CA_Blue( J )_Class9
P. 307

50           System.out.println("Please enter correct membership code 1, 2 or 3");
                  51           }

                  52           if(Room_type == "Deluxe")
                  53           {

                  54           System.out.println("You have chosen Deluxe Rooms.");
                  55           Per_Day_Charge = 2500;
                  56           Bill = Per_Day_Charge * Rooms * Days;

                  57           Discount = Bill * Deluxe_Discount / 100;

                  58           Amount_Payable = Bill - Discount;
                  59           }
                  60           else if (Room_type == "Super Deluxe")

                  61           {
                  62           System.out.println("You have chosen Super Deluxe Room.");

                  63           Per_Day_Charge=4200;
                  64           Bill = Per_Day_Charge * Rooms * Days;

                  65           Discount = Bill * Super_Deluxe_Discount / 100;
                  66           Amount_Payable = Bill - Discount;

                  67           }
                  68           else

                  69           {
                  70           System.out.println("Wrong Room Type");

                  71         System.out.println("Please enter correct room code 'Deluxe' or 'Super
                          Deluxe!'");
                  72           System.exit(0);

                  73           }
                  74
                  75             System.out.println("                                                             ");

                  76           System.out.println("\tTariff Detail");

                  77             System.out.println("                                                             ");
                  78           System.out.println("Tariff Per Day:" + Per_Day_Charge);
                  79           System.out.println("Number of Rooms: " + Rooms);

                  80           System.out.println("Number of Days: " + Days);
                  81             System.out.println("                                                             ");

                  82           System.out.println("Bill Amount: Rs." + Bill);
                  83           System.out.println("Seasonal Discount: Rs." + Discount);



                                                                                                Sample Projects  305
   302   303   304   305   306   307   308   309   310   311   312