Fellaz, sorry for the super duper late upload here in this category,, cuz my other net book was damaged.. so here’s it is!
To execute the said program, here’s a sample one..
So, here are some of the menu items.. #1 for the record entry, #2 for Displaying all Records, #3 for Displaying nth Record and #9 to clear File. Since our focus is to delete the duplicate ID’s.. let’s assume that the #3 is not there. 😀
1. First of all, you need to record first your input data. Just press #1 on your keyboard..
2. Second, as you pressed the #1 which is the Record Entry, the machine will asked you for the Student ID number and the Students’ name
3. If you inputted the same ID number, and different name.. it will be invalid ID, and sent it to myfile2.dat, it is because the first one has the ID# of 1111 which is the same as the second one. But the names are DIFFERENT. Here’s the output :
4. If you want to Display the records that you encoded earlier.. just press #2. So, it will look like this! 🙂
As you observed, that Student number 1111, Student name ‘Darlene’ was not there, it is because.. If the inputted data finds a duplicate ID’s.. it will automatically excluded. 😀
For clarification or questions, just don’t hesitate to write a comment in the comment box! And I’ll try my best to answer/help you as long as I can. 🙂
till next time!