Database System Concepts
Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
Bartleby Related Questions Icon

Related questions

Question

Write a program to handle a user's rolodex entries. (A rolodex is a system with tagged cards each representing a contact. It would contain a name, address, and phone number. In this day and age, it would probably have an email address as well.)

Typical operations people want to do to a rolodex entry are:

1) Add entry

2) Edit entry

3) Delete entry

4) Find entry

5) Print all entries

6) Quit

You can decide what the maximum number of rolodex entries is and how long each part of an entry is (name, address, etc.).

When they choose to edit an entry, give them the option of selecting from the current rolodex entries or returning to the main menu — don't force them to edit someone just because they chose that option.

Similarly for deleting an entry. Also don't forget that when deleting an entry, you must move all following entries down to fill in the gap.

If they want to add an entry and the rolodex is full, offer them the choice to return to the main menu or select a person to overwrite.

When they choose the print option, make a nicely formatted table of their current entries (if any).

When they choose to find an entry, go to a submenu:

1) find by Name

2) find by Address

3) find by Phone number

4) find by Email address

5) Return to Main Menu

All of these searches are to be case-insensitive content searches. (In other words, if the rolodex contains a person named Vishal Herrera, they should be found by searches by name of: sh, SH, al h, al H, herrera, HERRERA, etc. as well as of Vishal Herrera.)

Question: Should you print all matches to a search or just the first one?

All menus are to be choosable by both number and capitalized letter(s).

Hint: You'll only have one class — most likely. It might look something like this:

const size_t MAX_NAME = ???,

MAX_STREET = ???,

MAX_TOWN = ???,

MAX_STATE = 3,

MAX_PHONE = 14,

// ...other MAX's...

class RolodexEntry

{

char fname[MAX_NAME], lname[MAX_NAME]; // together or separate?

char street[MAX_STREET], town[MAX_TOWN], state[MAX_STATE];

long zip;

short zip_4;

char phone[MAX_PHONE];

public:

// ...ctor's, accessors, mutators, i/o, equality, etc.

};

Hint: This class should have its own library. Other libraries may also be used for collections of functions (like a generic list searching function? or special string searching functions).

Expert Solution
Check Mark
Knowledge Booster
Background pattern image
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
    Recommended textbooks for you
    Text book image
    Database System Concepts
    Computer Science
    ISBN:9780078022159
    Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
    Publisher:McGraw-Hill Education
    Text book image
    Starting Out with Python (4th Edition)
    Computer Science
    ISBN:9780134444321
    Author:Tony Gaddis
    Publisher:PEARSON
    Text book image
    Digital Fundamentals (11th Edition)
    Computer Science
    ISBN:9780132737968
    Author:Thomas L. Floyd
    Publisher:PEARSON
    Text book image
    C How to Program (8th Edition)
    Computer Science
    ISBN:9780133976892
    Author:Paul J. Deitel, Harvey Deitel
    Publisher:PEARSON
    Text book image
    Database Systems: Design, Implementation, & Manag...
    Computer Science
    ISBN:9781337627900
    Author:Carlos Coronel, Steven Morris
    Publisher:Cengage Learning
    Text book image
    Programmable Logic Controllers
    Computer Science
    ISBN:9780073373843
    Author:Frank D. Petruzella
    Publisher:McGraw-Hill Education