Package bookstore
Class PremiumMember
java.lang.Object
bookstore.PremiumMember
Represents a premium member customer
-
Constructor Summary
ConstructorsConstructorDescriptionPremiumMember(String name, int numPurchases, boolean hasPaidDues) Constructor for the PremiumMember class -
Method Summary
Modifier and TypeMethodDescriptiongetName()Getter for the member nameintGetter for the number of purchases a member has madebooleanGetter for checking if a member has paid the membership feevoidincrementPurchases(int numPurchases) Increment the number of purchases by a set amountvoidsetHasPaidDues(boolean hasPaidDues) Setter for changing whether or not a member has paid their membership feevoidSetter for the member namevoidsetNumPurchases(int numPurchases) Setter for the number of purchases by a member
-
Constructor Details
-
PremiumMember
Constructor for the PremiumMember class- Parameters:
name- the name of this MembernumPurchases- the number of purchases this member has madehasPaidDues- boolean for whether or not a member has made the premium membership fee
-
-
Method Details
-
getName
Getter for the member name- Returns:
- the name as a String
-
setName
Setter for the member name- Parameters:
name- the member's name
-
getNumPurchases
public int getNumPurchases()Getter for the number of purchases a member has made- Returns:
- the number of purchases a member has made
-
setNumPurchases
public void setNumPurchases(int numPurchases) Setter for the number of purchases by a member- Parameters:
numPurchases- the number of purchases by this member
-
incrementPurchases
public void incrementPurchases(int numPurchases) Increment the number of purchases by a set amount- Parameters:
numPurchases- the number of new purchases made by this member
-
setHasPaidDues
public void setHasPaidDues(boolean hasPaidDues) Setter for changing whether or not a member has paid their membership fee- Parameters:
hasPaidDues- boolean, true if they have paid the fee
-
hasPaidDues
public boolean hasPaidDues()Getter for checking if a member has paid the membership fee- Returns:
- true if dues have been paid, false if they haven't
-