Package bookstore
Class Member
java.lang.Object
bookstore.Member
Represents a member customer
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetName()Getter for the name fieldintgetter for the number of purchases a member has madevoidincrementPurchases(int numPurchases) a method to increment the number of purchases by a set amountvoidSetter for the name fieldvoidsetNumPurchases(int numPurchases) setter for the number of purchases by a member
-
Constructor Details
-
Member
Constructor for the Member class- Parameters:
name- the name of this MembernumPurchases- the number of purchases this member has made
-
-
Method Details
-
getName
Getter for the name field- Returns:
- the name as a String
-
setName
Setter for the name field- 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) a method to increment the number of purchases by a set amount- Parameters:
numPurchases- the number of new purchases made by this member
-