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

use double link list

Discussion in 'C' started by aansa05, Jan 7, 2013.

  1. aansa05

    aansa05 New Member

    Joined:
    Jan 7, 2013
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    Problem Statement:

    Write a program that asks user to enter information of a student and then save it in a doubly
    linked (bi-directional) sorted list. Moreover you should be able to retrieve a particular entry and modify/
    remove/print it to a text file.

    Following should be the prompt shown to user at start of program and after every operation indicated in
    the prompt.

    "
    Please choose one of the following options:

    1 - Add a new student's info
    2 - Edit a student's info
    3 - Get a student's info
    4 - Print info to a text file
    5 - Exit Program
    "

    Your design should follow these outlines for each prompt:

    - For "Add a new student's info" (ASK)
    -- Student Name
    -- Father Name
    -- Registration Number
    -- Section
    -- Major Area of Interest
    -- Current CGPA

    - For "Edit a student's info" (ASK)
    -- Edit student entry
    -- Search by (ASK)
    1 - Student Name
    2 - Registration No
    -- Display on screen in a nice readable format
    -- Allow user to choose field to edit (ASK)
    1 - Student Name
    2 - Father Name
    3 - Registration Number
    4 - Section
    5 - Major Area of Interest
    6 - Current CGPA
    -- Save edited info for that student
    -- remove a student entry
    -- Search by (ASK)
    1 - Student Name
    2 - Registration Number
    -- remove entry

    - For "Get a student's info"
    -- Search by (ASK)
    1 - Student Name
    2 - Registration Number
    -- Display on screen in a nice readable format


    - For "Print info to a text file" (ASK)
    1 - Particular student
    -- Search by (ASK)
    1 - Student Name
    2 - Registration Number
    2 - All students

    -- Target text file name (ASK)
    -- Target text file path (ASK)

    - For "Exit Program"
    -- remove all elements in list
    -- Just exit main function

    Guidelines:

    - Develop a 'Student' class (No need for template) to hold the student info mentioned
    - Develop a sorted doubly linked list to hold all student objects, you can sort it
    for any field of student class you want.
    - At every step confirm entry before moving on to next one when inputting data
    - Write data to text file if asked in a nice readable format with proper indentation
    - Main program should have an infinite while loop to continously run but a
    terminaring condition inside to break in case user wants to exit program
     
  2. xpi0t0s

    xpi0t0s Mentor

    Joined:
    Aug 6, 2004
    Messages:
    3,012
    Likes Received:
    203
    Trophy Points:
    0
    Occupation:
    Senior Support Engineer
    Location:
    England
    How far have you got and where are you stuck?
    Do you understand the requirements?
     

Share This Page