Thread: C Homework Problem

  1. #1

    Question C Homework Problem

    I am completely lost as to how to start on this problem. This is the last program of the semester, and I've been doing well up to this point.

    Any Help would be appreciated:

    "Create an electronic address book and keep track of the names, addresses, and phone numbers of family members, friends, and business contacts. Implement this address book as an ordered linked list.

    The program should perform the following operations:

    1) Load some preliminary entries into the address book from a file. These entries should be already sorted by last name and first name if necessary.

    2) Provide a menu of operations, including:

    a) Search for a person by last name and first name (if necessary) and display their information.

    b) Add new entries as an ordered list by last name and first name and read from the screen the rest of their information.

    c) Delete entries.

    d) Print out the names of all people between two last names.

    e) Depending on the userís request, print out the names of all family members, friends, or business contacts.

    f) End the program.

    3) Before ending the program, write the entire ordered list with all data to a file."

    Thank you

  2. #2
    Im a Capricorn vsriharsha's Avatar
    Join Date
    Feb 2002

    Thumbs up

    If You have worked with Structures and are comfortable with Linked Lists (which I feel you should have been, cos u r at the end of ur semister), then this problem should be quite simple...

    For a start....

    Declare a structure in the following manner...

    typedef struct node
    char *firstname;
    char *lastname;
    char *address;
    int phcode1; /* I guess the American Numbers will be in this */
    int phcode2; /* format. 432-375-1432. So, I split the phone */
    int phcode3; /* number into 3 parts. */
    struct node *next;

    Implement the above in a linked list. Remember, do not expect others to write ur programs. Others would only guide u. Try ur bit and get back with any doubts u have. If you are not comfortable with either structures or Linked lists, get back to ur books again.

    Warm Regards,
    Help everyone you can

  3. #3
    Join Date
    Sep 2001
    Read that post very carefully. Unregistered?....
    The world is waiting. I must leave you now.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. One More Homework Problem
    By joxerjen in forum C++ Programming
    Replies: 5
    Last Post: 10-12-2005, 04:39 PM
  2. searching problem
    By DaMenge in forum C Programming
    Replies: 9
    Last Post: 09-12-2005, 01:04 AM
  3. half ADT (nested struct) problem...
    By CyC|OpS in forum C Programming
    Replies: 1
    Last Post: 10-26-2002, 08:37 AM
  4. binary tree problem - help needed
    By sanju in forum C Programming
    Replies: 4
    Last Post: 10-16-2002, 05:18 AM
  5. homework assignment problem
    By Unregistered in forum C Programming
    Replies: 4
    Last Post: 10-29-2001, 10:24 AM