Package bookstore

Class PremiumMember

java.lang.Object
bookstore.PremiumMember

public class PremiumMember extends Object
Represents a premium member customer
  • Constructor Details

    • PremiumMember

      public PremiumMember(String name, int numPurchases, boolean hasPaidDues)
      Constructor for the PremiumMember class
      Parameters:
      name - the name of this Member
      numPurchases - the number of purchases this member has made
      hasPaidDues - boolean for whether or not a member has made the premium membership fee
  • Method Details

    • getName

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

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