title: How do I add the rewards properly, to this customer account?
body: <p>I'm trying to figure out how to implement the &quot;Rewards&quot; program for the customer accounts on my weekend project, I created an array list and wrote a boolean to return true if the account is in the array.  But I can't figure out how to attach the rewards to the actual account, or I'm just drawing a blank.  ** I just now actually realized it said not to worry about signing in (HA!). I would still appreciate any help though.  ** edit 2 **
  The rewards are just a simple 1 point per dollar spent.  10 points =$5 and reset points.</p>
  <pre><code>/* Notes for Bonus:
          Users are of two types: Admin and Customer. An admin can check and update inventory.
          You may create your own default admin user, but customers must signup
          Users should have an email and password to verify to access rewards.
          Do not worry about signing in, just signup and verify.
          Admins should have to verify to access inventory functionality.
          Users may be stored inside an array to be kept track of.
          Sally said she would like it if you kept track of user's total $ spent as well
          to make keeping track of rewards easy.
  </code></pre>
  <h2>MAIN METHOD</h2>
  <pre><code>public class SallysLemonadeStand {
  
      public static void main(String[] args) {
          Scanner scanner = new Scanner(System.in);           ArrayList&lt;Customer&gt; customerAccount = new ArrayList&lt;Customer&gt;();
          Lemonade lemonade = new Lemonade();                  Admin admin = new Admin();
          Water water = new Water();
          Soda soda = new Soda();
          Cookies cookies = new Cookies();
          Candy candy = new Candy();
  
  
  
  
          while(true) {
              System.out.println(&quot;Welcome to Sallys Lemonade Stand!&quot;);
              System.out.println(&quot;Please input your selection&quot;);
              System.out.println(&quot;1: Lemonade, 2: Water, 3: Soda, 4: Cookies, 5: Candy&quot;);
              System.out.println(&quot;Press 6 to sign up for a customer account WITH REWARDS!&quot;);
              System.out.println(&quot;Press 7 to login to Admin Account.&quot;);
              int choice = scanner.nextInt();
              scanner.nextLine();
  
  
              switch(choice) {
              case 1:
                  Customer.customerSignin(scanner, customerAccount);
                  customerEngagement(scanner, lemonade, customerAccount);
                  break;
              case 2:
                  customerEngagement(scanner, water, customerAccount);
                  break;
              case 3:
                  customerEngagement(scanner, soda, customerAccount);
                  break;
              case 4:
                  Cookies.cookieSale (scanner, cookies, customerAccount);
                  break;
              case 5:
                  customerEngagement(scanner, candy, customerAccount);
                  break;
              case 6:
                  Customer.signupCustomer(scanner, customerAccount);
                  break;
              case 7: Admin.adminPriveledge(scanner, admin, lemonade,water,soda,cookies,candy);
                          System.out.println(&quot;Would you like to see how many customers have signed up? y/n&quot;);
                          String selection = scanner.nextLine();
                              if(selection.equalsIgnoreCase(&quot;y&quot;)) {
                                  Admin.customerAccountSheet(scanner, admin, customerAccount);
                              }
                          
  
              break;
  
              }
          }
  
      }
  
      public static void customerEngagement(Scanner scanner, ProductInterface product, ArrayList&lt;Customer&gt; customerAccount) {
          System.out.println(&quot;Please input the quantity of your product you want: &quot;);
          int amountOfItems = scanner.nextInt();
          double amountDue = product.sellProduct(amountOfItems);
          System.out.println(&quot;Your cost is: &quot; + amountDue);
          ProductInterface.pay();
          System.out.println(&quot;Thank you for shopping with Sallys!&quot;);
          product.removeFromStock(amountOfItems);
              if(Customer.customerSignin(scanner, customerAccount) == true) {
                  
                  
                  
                  
                      
                  
                  
              }
      }
      
          
  
  
  }
  </code></pre>
  <p>As you can see, I'm trying to write a rewards method, but it doesn't seem right to me.</p>
  <p>The accounts interface only implements the email and password.</p>
  <p>If you need to see the rest of my code, please let me know.  First time posting on here.</p>
  <pre><code>public class Customer implements Accounts {
      String email;
      String password;
      int rewards;
  
      Customer() {}
  
      public String getEmail() {
          return email;
      }
  
      public int getRewards() {
          return rewards;
      }
  
      public void setRewards(int rewards) {
          this.rewards = rewards;
      }
  
      public void setEmail(String email) {
          this.email = email;
      }
  
      public String getPassword() {
          return password;
      }
  
      public void setPassword(String password) {
          this.password = password;
      }
  
      @Override
      public String email() {
          // TODO Auto-generated method stub
          return email;
      }
  
      @Override
      public String password() {
          // TODO Auto-generated method stub
          return password;
      }
      @Override
      public String toString() {
          return email;
      }
  
      public static void signupCustomer(Scanner scanner, ArrayList&lt;Customer&gt; customerAccount) {
          String choice;
  
          System.out.println(&quot;Would you like to create a new customer account? y/n&quot;);
          choice = scanner.nextLine();
          if (choice.equalsIgnoreCase(&quot;y&quot;)) {
              Customer account = new Customer();
              System.out.println(&quot;Please enter an email for your account. &quot;);
              account.setEmail(scanner.nextLine());
              System.out.println(&quot;Is &quot; + account.getEmail() + &quot; correct? y/n&quot;);
              choice = scanner.nextLine();
              if(choice.equalsIgnoreCase(&quot;y&quot;)) {
                  System.out.println(&quot;Please enter a password for your account. &quot;);
                  account.setPassword(scanner.nextLine());
                  System.out.println(&quot;Is &quot; + account.getPassword() + &quot; correct? y/n&quot;);
                  choice = scanner.nextLine();
                  if(choice.equalsIgnoreCase(&quot;y&quot;)) {
                      customerAccount.add(account);
                  }
              }
          }   
      }
      public static boolean customerSignin(Scanner scanner, ArrayList&lt;Customer&gt; customerAccount) {
          System.out.println(&quot;Are you enrolled in our Rewards Program? y/n&quot;);
          String choice = scanner.nextLine();
          String email;
          String password;
  
          if (choice.equalsIgnoreCase(&quot;y&quot;)) {
              System.out.println(&quot;Please enter email and password: &quot;);
              System.out.println(&quot;Email: &quot;);
              email = scanner.nextLine();
  
              for (Customer account : customerAccount) {
                  if(email.equalsIgnoreCase(account.email)) {
                      System.out.println(&quot;Password: &quot;);
                      password = scanner.nextLine();
                      if(password.equalsIgnoreCase(account.password)) {
                          return true;
                      }
  
                  }
              }
  
          }
          return false;
  
      } 
      public static void customerRewards(Scanner scanner, ArrayList&lt;Customer&gt; customerAccount) {
          
      }
  
  }
  </code></pre>