Reference no: EM131270367
Assignment: Concepts and Ideas
I want you to write a program that reads a text file containing a phone book listing. The program shall read the file, allow new entries, and write the file to disk such that you can extend the text file as people enter new data.
Supplied Items:
1. ReadWrite Project with the MailList class demonstrating reading and writing of the text files.
2. Simple MAP demonstrating the use of a STL MAP. The notes give a good explanation of the Simple MAP program.
3. Address.txt file that contains a starter list for your phone book.
4. MSDN Function Help handout that may help with some of the io functions.
Tasks To Do:
1. Start off looking over the projects, reviewing them and understanding them as much as possible. This will be done in class.
2. Generate a new project called PhoneBook.
3. Add the MailList class to your PhoneBook project.
4. Copy the file io functions to read in the data (address.txt) and fill the array.
5. The problem with the io functions are that they use an array. This will be a problem when you start adding a bunch of people to your phonebook. So you need to use the example SimpleMap program code to implement the STL MAP into your project in place of the array.
6. Once you can read the file, put it into your MAP, and write the file from your MAP, put together a user interface giving the option to query the database for a name to get the number, or add entries.
7. Query means that the user types in a name, the MAP finds the number and returns it.
8. Add information simply means that the user is asked for name, number, address, etc. and a new entry is entered into the map.
9. When the user wants to quit, the contents of the map is saved to file.
Explain how the maximization problem can be solved
: Explain how the maximization problem can be solved without using the method of Lagrange multipliers.- Explain how the minimization problem can be solved without using the method of Lagrange multipliers.
|
Work scheduling problems
: Work Scheduling Problems: Section 3.5 (p.76) #5: Each day, workers at the Gotham City Police Department work two 6-hour shifts chosen from 12 A.M. to 6 A.M., 6 A.M. to 12 P.M., 12 P.M. to 6 P.M., and 6 P.M. to 12 A.M. Formulate an LP that can be used..
|
How many hours a month does martha work
: a) How many hours a month does Martha work? What is her income? b) The government institutes a welfare program that guarantees individuals $2000/month. The guarantee is phased out immediately with the first dollar of income earned. How many hours ..
|
Give an example of a circuit with a cyclic path
: Alyssa P. Hacker says that any Boolean function can be written in minimal sum-of-products form as the sum of all of the prime implicants of the function. Ben Bitdiddle says that there are some functions whose minimal equation does not involve all ..
|
Generate a new project called phonebook
: Generate a new project called PhoneBook. Add information simply means that the user is asked for name, number, address, etc. and a new entry is entered into the map.
|
How many of each type of set should be manufactured
: A manufacturing company produces two models of an HDTV per week,- how many of each type of set should be manufactured per week to minimize cost? What is the minimum cost?
|
Documented condition to be coded
: Past treatments incuded oral gold, penicillamine, and two short bouts of oral predisone. What is the documented condition to be coded?
|
What is the break-even volume for each plan
: A small business company is considering updating the current production line. There are two plans. For plan A, the fixed cost will be $35,000 and the variable cost will be $25 per unit after the update. Suppose the selling price is $35, what is the b..
|
Set the reserve requirement
: Suppose that Second Republic Bank currently has $150,000 in checkable deposits and $97,500 in outstanding loans. The Federal Reserve has set the reserve requirement at 10%. Using these values, fill in the empty cells for reserves, required reserve..
|