1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Data structures

Discussion in 'C' started by harim, Oct 26, 2011.

  1. harim

    harim New Member

    Joined:
    Apr 18, 2011
    Messages:
    15
    Likes Received:
    0
    Trophy Points:
    0
    develop a C++ program and use linked list to store student ids and names.
    Each node in the linked list will contain three items: student id, student name, pointer to next node.
    When the program starts, it should display the following menu:
    1- Enter student information
    2- Search student by ID
    3- Search student by Name
    4- Delete student information
    5- Print all students
    6- Quit
    Sample Run:
    1- Enter student information
    2- Search student by ID
    3- Search student by Name
    4- Delete student information
    5- Print all students
    6- Quit
    Enter your choice: 1 (Suppose user entered 1)
    (Now the details of Student will be entered)
    Student ID: bc080400001 (Suppose user entered bc080400001)
    Student Name: Ahmad (Suppose user entered Ahmad)
    (If user enters an ID that is already in the list, a message should be displayed “Already in the list.â€)

    (Main menu will be displayed again)
    1- Enter student information
    2- Search student by ID
    3- Search student by Name
    4- Delete student information
    5- Print all students
    6- Quit
    Enter your choice: 2 (Suppose user entered 2)
    Student ID: bc080400001 (Suppose user entered bc080400001)
    (Now the details of Student will be displayed)
    Student ID: bc080400001
    Student Name: Ahmad
    (If user enters an ID that is not in the list, a message should be displayed “Record not found.â€)

    (Main menu will be displayed again)
    1- Enter student information
    2- Search student by ID
    3- Search student by Name
    4- Delete student information
    5- Print all students
    6- Quit
    Enter your choice: 4 (Suppose user entered 4)
    (Now it will ask to enter ID to be deleted)
    Student ID: bc080400001 (Suppose user entered bc080400001)
    (Student record with this ID will be deleted.)

    (Main menu will be displayed again)
    1- Enter student information
    2- Search student by ID
    3- Search student by Name
    4- Delete student information
    5- Print all students
    6- Quit
    Enter your choice: 5 (Suppose user entered 5)
    (Now it will print all students’ information. Suppose there were three students in the list, so it will print: )
    Student ID Student Name
    ------------- ---------------------
    bc080400001 Ahmad
    bc080200010 Ali
    mc070400002 Hassan

    (Main menu will be displayed again)
     
  2. SADIQ

    SADIQ New Member

    Joined:
    Oct 26, 2011
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    just now i logged in........i need to learn data structures
     
  3. harim

    harim New Member

    Joined:
    Apr 18, 2011
    Messages:
    15
    Likes Received:
    0
    Trophy Points:
    0
    Any one plz help me its my assignemt. and due date is 29th October plz give any on solution of the assignment sooooooooooooooooooooooooo
     

Share This Page