Task I: Using classes and linked lists, design an online address book to keep track of the names, addresses, phone numbers, and dates of birth of family members, close friends, and certain business associates. Your program should be able to handle as many entries as required.
- 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 member variables.
- Define a class extPersonType using the class personType (as defined in Example 10-10, Chapter 10), the class dateType (as designed in chapter 11s Programming Exercise 2), and the class addressType. Add a member variable to this class to classify the person as a family member, friend, or business associate. Also, add a member variable to store the phone number. Add (or override) the functions to print and store the appropriate information. Use constructors to automatically initialize the member variables.
- Define the class addressBookType using the previously defined classes. An object of the type addressBookType should be able to process as many entries as required.
The program should perform the following operations:
- Load the data into the address book from a disk.
- Sort the address book by last name.
- Search for a person by last name.
- Print the address, phone number, and date of birth (if it exists) of a given person.
- Print the names of the people whose birthdays are in a given month.
- Print the names of all the people between two last names.
- Depending on the user's request, print the names of all family members, friends, or business associates.
- Add or delete a new entry to the address book.
- Allow the user to save the data in the address book.
Note that your program use classes, linked lists, as well as t least one of searching and one of sorting algorithms discussed in the class. However, sequential search and sort algorithms cannot be used in this task due to its high time and space computational complex.
Task I: Write a progam to keep track of a hardware store inventory. The store sells various items. For each item in the store, the following information is kept: item ID, item name, number of pieces ordered, number of pieces currently in the store, number of pieces sold, manufacturer's price for the item, and the store's selling price. At the end of each week, the store manager would like to see a report in the following form: See image.
The total inventory is the total selling value of all the items currently in the store. The total number of items is the sum of the number of pieces of all the items in the store.
The program should be menu driven, giving the user various choices, such as
- checking whether an item is in the store,
- selling an item, and
- printing the report.
- After inputting the data, sort it according to the items' names. Also, after an item is sold, update the appopriate counts.
Initially the number of pieces (of an item) in the store is the same as the number of pieces ordered, and the number of pieces of an item sold is zero. Input to the program is a file consisting of data in the following form:
- itemID
- itemName
- pOrdered manufPrice sellingPrce
Use seven parallel vectors to store the information the program must:
- contain at least one function to input data into the vectors
- contain at least one function to display the menu
- contain at least one function to sell an item
- contain at least one function to print the report for the manager
- use a recursive (but not iteration) algorithm to sort