cp51010 - ECE 3331 Computer Problem 5 Spring 2010 (due...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
ECE 3331 Computer Problem 5 Spring 2010 (due 4/20/2010) Write a "simplified" course registration program by first building a linked list of available courses, and then building class rolls. The user-defined type STUDENT is given by the typedef: typedef struct student { char name[30]; unsigned int id; struct student *next; } STUDENT; The user-defined type COURSE is given by the typedef: typedef struct course { char title[50]; unsigned int code; int cur_enrollment; int quota; STUDENT *student; struct course *next; } COURSE; The pointer student in each COURSE points to the first student in that section; the pointer next in each COURSE points to the next course scheduled, if any; and the pointer next in each STUDENT points to the next enrolled student, if any. All storage for COURSEs and STUDENTs must be allocated at run time. The available courses are to be read from a data file named cp5_cour.txt . This is a text file, with each line containing the course title terminated by a semicolon, the class code terminated by a semicolon, and the quota. As you read them in you should create a linked-list of courses.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 10/26/2011 for the course ECE 3331 taught by Professor Staff during the Fall '08 term at University of Houston.

Page1 / 2

cp51010 - ECE 3331 Computer Problem 5 Spring 2010 (due...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online