Anda di halaman 1dari 1

Assignment 1v2 (10%) Due date on 26 October 2012.

. There wont be pity marks on groups that failed to submit on time. Do it in a group of less than 5 people. If you want to do it individually, you can. Develop your program in C++. For this assignment, I will ask each group to present and make changes on the spot if necessary. If you are not able to demonstrate that you understood what you have submitted, marks will be given accordingly. Using classes, develop an address book to keep track of the matric numbers, names, addresses, phone numbers, genders, races, religions, and dates of birth of classmates. Your program should be able to handle a maximum of 300 entries. a. Define a class addressType, that can store a street address, city, state and zip code. Use the appropriate functions to print and store the address. Also use constructors to automatically initialise the data members. b. Define a suitable class extPersonType using the class personType (as defined in Example 1-12, Chapter 1), the class dateType (as design in Programming Exercise 2 of Chapter 2), and the class addressType. Add data members to this class to include the gender, matric number, race and religion. Also, add a data member to store the phone number. Add (or override) the functions to print and store the appropriate information. Use constructors to automatically initialise the data members. c. Derive the class addressBookType from the class arrayListType, as defined in Chapter 3, so that an object of type addressBookType can store objects of type extPersonType. An object of type addressBookType should be able to process a maximum of 300 entries. Add necessary operations to the class addressBookType so that the program should perform the following operations. i. Load the data into the address book from a file. ii. Search for a person by the matric number. iii. Print the details of a given person. iv. Print the matric numbers, names, and date of birth of the people whose birthdays are in a given month or between two given dates. v. Print the names of all the people with the same status, such as gender, race, and state.

Anda mungkin juga menyukai