Welcome to Dream.In.Code
Become a C++ Expert!

Join 137,212 C++ Programmers for FREE! Get instant access to thousands of C++ experts, tutorials, code snippets, and more! There are 2,265 people online right now. Registration is fast and FREE... Join Now!




Construct a linked-list of structs to model the list of students given

 
Reply to this topicStart new topic

Construct a linked-list of structs to model the list of students given, arrays , structs

princeofhere
31 May, 2008 - 02:57 AM
Post #1

New D.I.C Head
*

Joined: 30 Apr, 2008
Posts: 10

5. Construct a linked-list of structs to model the list of students given in table below,
use the above mentioned provided code. The struct should contain at least one
member pointer to the next variable of the struct type in the list. Now try
answering the following questions:
a. Write a function to as a user to enter the required data for each student.
b. Write a function to print out the data for all students, in order shown in the
table, without the table itself.
c. Write a function to add a new student, that is, you with your valid BUEID)
at the start of the list. Then use "a." above to print the data out.
d. Write a function to add a new student, that is, you with your valid BUEID)
at the end of the list. Then use "a." above to print the data out.
e. Write a function to add a new student, that is, you with your valid BUEID)
at the middle of the list. Then use "a." above to print the data out.
f. Write a function to find the average of all students per subject. Print the
output.
g. Write a function to find the max and min of all students per subject. Print
the output.
h. Write a function to find the average, max and min subjects per student.
Print the output.
i. Do a, b, c above, again but to remove an item from the list, accordingly.
j. Would a-d above be easier if we had pointers to the item before and the
item after the current item-in the list- inside the struct type? Why?
Please turn in all the print outs (and softcopy of source code) mentioned
above. A demo is expected if this makes up for 0 mark due to plagiarism.
Note:
1. To dynamically allocate memory use the new() function (or method)
and to deallocate memory use delete() function (or method).
2. Please consult the figure below to imagine the different ways a linkedlist
can be designed and implemented.
User is offlineProfile CardPM
+Quote Post

KYA
RE: Construct A Linked-list Of Structs To Model The List Of Students Given
31 May, 2008 - 03:01 AM
Post #2

#include <nerd.h>
Group Icon

Joined: 14 Sep, 2007
Posts: 5,056



Thanked: 124 times
Dream Kudos: 1200
My Contributions
Dream.In.Code has a policy by which we prefer to see a good faith effort on your part before providing source code for homework assignments. Please post the code you have written in an effort to resolve the problem, and our members would be happy to provide some guidance. Be sure to include a description of any errors you are encountering as well.

Please post like this:

Thank you for helping us helping you.
User is online!Profile CardPM
+Quote Post

Reply to this topicStart new topic
Time is now: 12/4/08 01:16PM

Live C++ Help!

C++ Tutorials

Reference Sheets

C++ Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month