Customer Shopping
ICS111 Spring 2004

Due Time/Date: Friday April 30th 2003 at 10:00 p.m. uhunix time.
What to do Write a program to work with your homework 2 program
How to turn in your homework?

Send e-mail to ics111-homework@hawaii.edu. The subject of the e-mail should be "store/lastname" (don't include the quotes). The subject of the e-mail should be exactly as shown or you will get points deducted. You should attach all your java code to your e-mail. 
Make sure that your file is not zipped or otherwise compressed, or you will get no credit.


The Customer.java class should have the following instance variables:

Be sure to implement all the set and get methods, the toString method and the equals method. In this case the equals method should compare the customer's name only.

You will have a driver class (main class) called Store.java. This class will have the following menu:

  1. Create a new customer
    This will request/validate all the customer information, so that a customer can be added to the array of customers. Duplicate customer names are ok.
  2. Customer wants to shop
    This will take a particular customer to the program that you created in assignment 2.
  3. Find and print a customer (find using name)
    The customer name will be entered by the user. Your program will find the customer and print all the information about the customer. If there are duplicate customers, you should print them all.
  4. Print all customers that have spent more than a given amount of money. The amount of money will be given by the user.
  5. Print all the store customers
  6. End the program

For this class you should implement a find method.


This method will take a String name as a parameter and will return an array of customers. It is necessary to return an array because more than one customer may have the same name. If no customers are found with that name, then return an empty array.

You will create an array of customers. You can have up to 100 customers. Remember not to use magic numbers.

If you have any more questions please e-mail Blanca or Matt Sharritt

Back to homework page