Thread: A few tips please...

  1. #1
    Registered User
    Join Date
    Apr 2002

    Question A few tips please...

    I'm completely new to C++ programming, I have to take a module in it at university. I have been given this project to do, I understand what I want the program to do but I am at a loss where to start - If someone could give me a few pointers about where to start I'd really appreciate it, I don't want the code done or anything, I need to do it myself but I just need a few guidelines to follow.


    Here is the project:

    Write a database application which will hold the data of students

    For each student, you should store the following information:

    ∑ Student No

    ∑ Student Name

    ∑ Student Surname

    ∑ List of courses student is registered

    Each student will be sorted according to the student number in the linked list. You should be able to add new students to the system as well as deleting them.

    At the beginning of the program, print a menu on the screen to select desired user action. The menu will be:

    1. Insert Student

    2. Delete Student

    3. Register a Student to a Lecture

    4. List all students

    5. List details of a single student

    6. Exit

    To delete a student from the list, ask the user for student number and delete the student from the linked list. Donít forget to update the links to preserve correct ordering of the students.

    When registering a student to a lecture, you should first get the student number from the user and then make the necessary changes only in that studentís record.

    When listing all students, only print student number, name, surname as well as the memory location of the student object and the memory location of the next student object

    When listing details of a single student, get the student number from the user and print studentís number, name, surname and list of courses the student is registered to.

  2. #2
    This seems pretty advanced for an intro course. Store your student info in a struct or class. Use a linked list per the instructions.

  3. #3
    Registered User
    Join Date
    Dec 2001
    yes classes sounds good!

  4. #4
    Registered User
    Join Date
    Apr 2002
    You could use a switch statement for the menu...and then just write the functions for each part ?

  5. #5
    Registered User
    Join Date
    Apr 2002

    Cool This is some hint....

    You have two choices from :
    1. OOP
    2. Old fashion

    1. OOP: in the first one you should creat a class of Student and it has the 3 or 4 variables that you have..
    in the second step,
    in the main you creat a dinamic array which will be having these students that you will be inserting...

    You will be needing to creat a functions to add student : Structor,
    then dellet a student : but in this one you better be carfull to find the student that you need to dellete ... you look for the number fisit .... if x == Student.Number
    dellet that object from the array that you have ...
    use for loop to make this StudentArray[i] = StudentArray[ i+1]
    //to the end of the array
    you can use decoder to put the student number
    Student.SNumber = i++ /* i : integer and intially it has the number 0; */
    The best

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Programming Tips
    By webmaster in forum General Discussions
    Replies: 26
    Last Post: 01-11-2017, 04:07 PM
  2. Ballon Tips in C++ (Borland C++ Builder 6)
    By dfghjk in forum C++ Programming
    Replies: 4
    Last Post: 05-11-2008, 08:00 PM
  3. Tips on becoming a competent programmer
    By trickae2 in forum C Programming
    Replies: 16
    Last Post: 08-28-2006, 07:33 PM
  4. C++ Programming Tips
    By gflores in forum C++ Programming
    Replies: 20
    Last Post: 09-14-2004, 07:53 PM
  5. any useful tips to increase speed when parsing files
    By Shadow12345 in forum C++ Programming
    Replies: 2
    Last Post: 01-18-2003, 05:52 PM