Hello there!

A very close friend of mine asked me for help a few days ago regarding a C++ program and I thought I could help him. Unfortunately the program seems a bit too complicated for me and that's why I ask for your assistance!

I'd really appreciate if any of you could help me or at least give me some tips and guidelines

Ok, here's a brief describtion of my friend's assignment:


Write a program that stores information (something like a a database i guess) about teachers. Include the following:
1) Class;
2) First name of the teacher;
3) Family name;
4) School name;
5) Years of service.

The program should be able to perform the following tasks:

1. Creating the so-called database on start (at least 20 entries required) and storing them on a separate file called "prep.txt".

2. Printing the data on the screen.

3. Include the following Options:

> adding new entries;
> editing current entries using the following filters:
1) class;
2) teacher's family name;
3) teacher's years of service.

>deleting entries using the following fileters:
1) class;
2) teacher's family name;
3) teacher's years of service.

>sorting entries by:
1)teacher's family name (asc);
2)years of service (desc).

4. Making References to:

> all teachers teaching the same class;
> all teachers with years of service > 5 y.;
> all math teachers (stored on separated file - "matem.txt").

_____________________________________________________________


The describtion ain't very clear but thats the exact assignment.. By the way, there's no requirement for the program to use Windows interface (thank God).


I tried using structures and I managed to save the information on a separated file and print it on the screen.

For the so called options menu I used a switch case statement and functions but all I could do was the part about adding new entries.. To be honest I don't really know how to do the rest..

Any help, tips, guidelines etc. would be more than welcome! I apologise for bothering you with that stuff but I really don't know what to do and I promised my friend to do it for him, he really needs some assistance right now..

Thank you all in advance!

David

PS: If it's not too much to ask for, I would really really appreciate if anyone could post the source code, I've been trying to do it for over a week or so and spent some sleepless nights on it but unfortuantely my efforts have been in vain..