public class ActivityTab
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private double |
amountOwed |
private java.lang.String |
name |
private int |
roomNumber |
Constructor and Description |
---|
ActivityTab(java.lang.String nameIn,
int roomNumberIn,
double amountOwedIn)
Make the class to hold the information for the name, room number and amount owed
|
Modifier and Type | Method and Description |
---|---|
void |
addAmountOwed(double activityPrice)
Accumulator to add the amount that the person owes to their total
|
double |
getAmountOwed()
Getter method to get the amount owed
|
java.lang.String |
getName()
Getter method to get the name of person on tab
|
int |
getRoomNumber()
Getter to get the room number of person on tab
|
double |
processTip(double percentageAmount)
Calculate the tip with the percentage they wish to use
|
private final java.lang.String name
private final int roomNumber
private double amountOwed
public ActivityTab(java.lang.String nameIn, int roomNumberIn, double amountOwedIn)
nameIn
- The name of the person to be put on fileroomNumberIn
- The room number the person on file is to be put inamountOwedIn
- The amount owed when initializing the class (Always 0.00 as of now, can be changed for modularity)public double getAmountOwed()
public java.lang.String getName()
public int getRoomNumber()
public void addAmountOwed(double activityPrice)
activityPrice
- The price of the activitypublic double processTip(double percentageAmount)
percentageAmount
- The percentage amount (e.g. 18% = 18)