Tuesday, September 11, 2007

Programming Assigment: Class

Due Date: Sept. 7, 2007
Worth: 50

1. Address Book Entry. Your task is to create a class that contains an address book entry. The following table describes the information that an addressbook entry has.

Attributes/Properties - Description
--------------------------------------------------------------------------------------
Name - Name of the person in the addressbook
Address - Address of the person
Telephone Number - Telephone number of the person
Email Address - Person's Email address

For the methods, create the following:
  1. Provide the necessary accessor and mutator methods for all the attributes
  2. Constructors
2. AddressBook. Create a class address book that can contain 100 entries of AddressBookEntry objects (use the class you created in the first exercise). You should provide the following methods for the address book.
  1. Add entry
  2. Delete entry
  3. View all entries
  4. Update an entry

Tuesday, September 4, 2007

Programming Assigment: One-dimensional Array

Due Date: Sept. 7, 2007
Worth: 20

Modify RandomStudent.java so that it stores a parallel array of type boolean named isFemale, where element i is true if student i is female and false otherwise. Now, print out one male student at random and one female student at random.

Hint: use a do-while loop to generate random integers until you get one that indexes a male student.

Note: Duplicated work is considered as zero.