1. C++ programming
Create a C++ program the stores address book to keep track of the names, address, city, state, and zip code. Using the appropriate functions to print and store the address. Also, use constructors to automatically initialize the data member.
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 initialize the data member.
b. Define a classextPersonType using the class datatype and the class addressType. Add a data member to this class to classify the person as a family member, friend, or business associate. 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 initialize the data members.
c. Derive the class addressBookType from the classarrayListType so that an object of tyoeaddressBookType can store objects of type extPersonType. An object of type addressBookType should be able to process a maximum of 500 entries.
d. Add necessary operations to the class addressBookType so that the program should perform the following operations;
- Load the data into the address book from a disk.
- Search for a person by last name
- Print the address, phone number, and date of birth
- Print the names of the people whose birthdays are in a given month.
- Print the names of all people having the same status; family, friend, or business.
2. In need to create a C++ program that allows the user to enter the last names of five candidates in a local elections and the votes received by each candidate. The program should then output each candidates name, votes received by that candidate, and the percentage of the total votes received by the candidate. The program needs to output the winner of the election.
Sample;
Candidate Votes Received % of Total Votes
Johnsons 50000 25.91
Miller 40000 20.74
Duffy 60000 31.23
Robinson 25000 12.95
Sam 1800 9.33
Total 19300
The winner of the Election is Duffy.