NotesWhat is notes.io?

Notes brand slogan

Notes - notes.io

public class Hotel {

private static final double ROOM_RATE = 79.95;
private static final double TAX_RATE = 6.5;
private static final double TELEPHONE = 5.75;
private static final double MEAL_COST = 12.95;
private static final double TIP_RATE = 0.075;

private int noOfNights;
private int noOfGuests;
private double amountDue;
private double meal;
private double tax;
private double subtotal;
private double total;
private double tip;
private String roomNumber;

public Hotel(String room)
{

roomNumber = room;
noOfGuests = 1;
noOfNights = 1;

}

public Hotel( String room, int nights)
{

this(room);
noOfNights = nights;

}

public Hotel(String room, int nights, int guest)
{

this(room, nights);
noOfGuests = guest;

}

public void addNights(int nights)
{

noOfNights = noOfNights + nights;

}

public void addGuest(int guests)
{

noOfGuests = noOfGuests + guests;

}

public void calculate()
{

amountDue = ROOM_RATE * noOfNights * noOfGuests;
tax = amountDue * TAX_RATE/100;
subtotal = amountDue + tax;
meal = MEAL_COST * noOfNights;
tip = TIP_RATE * (subtotal + meal + TELEPHONE);
total = subtotal + TELEPHONE + meal + tip;

}

public String getRoomNumber()

{

return roomNumber;

}

public double getRoomRate()

{

return ROOM_RATE;

}
public int getNumberOfNights()

{

return noOfNights;

}
public int getNumberOfGuests()

{

return noOfGuests;

}

public double getAmountDue()
{

return amountDue;

}

public double getTaxRate()
{

return TAX_RATE;

}

public double getTaxDue()
{

return tax;

}

public double getSubtotal()
{

return subtotal;

}

public double getPhoneCharges()
{

return TELEPHONE;

}

public double getMeal()
{

return meal;

}

public double getTip()
{

return tip;

}

public double getTotal()
{

return total;

}
}
     
 
what is notes.io
 

Notes.io is a web-based application for taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000 notes created and continuing...

With notes.io;

  • * You can take a note from anywhere and any device with internet connection.
  • * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
  • * You can quickly share your contents without website, blog and e-mail.
  • * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
  • * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.

Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.

Easy: Notes.io doesn’t require installation. Just write and share note!

Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )

Free: Notes.io works for 12 years and has been free since the day it was started.


You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;


Email: [email protected]

Twitter: http://twitter.com/notesio

Instagram: http://instagram.com/notes.io

Facebook: http://facebook.com/notesio



Regards;
Notes.io Team

     
 
Shortened Note Link
 
 
Looding Image
 
     
 
Long File
 
 

For written notes was greater than 18KB Unable to shorten.

To be smaller than 18KB, please organize your notes, or sign in.