Help please in the problem, in the condition:
Write a program for building information about student performance. Each entry must contain a statement that the group number, name of student, grade point average for the last session. Display the list of students in groups. In each group the names of students placed in descending order of average scores.
Display the list, I still know how to do but how to make that the names were in descending order, do not know!
One challenge for the structure
Started by DimaStudMaestro1, Mar 07 2010 08:14 AM
2 replies to this topic
#1
Posted 07 March 2010 - 08:14 AM
|
|
|
#2
Posted 07 March 2010 - 09:22 AM
Use some data structure to store the entries. Store in the data structure a comparison function (that defines bigger than relation). Implement a function that sorts the list (search Google for some sorting algorithm) or insert each entry in the right place and keep the data structure sorted. Then use a function that iterates on all the nodes in the data structure and prints each node.
#3
Posted 08 March 2010 - 06:20 PM
If I were doing it, I would probably use a SQLite database to store the data. However, if you're doing this for an assignment, I would start by making a vector of "student" classes.


Sign In
Create Account

Back to top









