Package bookstore

Class Member

java.lang.Object
bookstore.Member

public class Member extends Object
Represents a member customer
  • Constructor Details

    • Member

      public Member(String name, int numPurchases)
      Constructor for the Member class
      Parameters:
      name - the name of this Member
      numPurchases - the number of purchases this member has made
  • Method Details

    • getName

      public String getName()
      Getter for the name field
      Returns:
      the name as a String
    • setName

      public void setName(String name)
      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