首页 > > 详细

辅导CS1713 Linked Lists Using Pointers讲解R程序、R语言讲解留学生

,Linked Lists。

Requirement

This assignment is like #2 except

  • The Course information should be represented as a linked list using pointers.
  • EXTRA CREDIT The course structure will now have a waitlist member which will track students on the waitlist for that course. When a student tries to register for a course that is full, we automatically add them to that course’s waitlist.
  • There is a new include file, cs171p3.h

Input

Courses: same as Programming Assignment #2; however, instead of placing it in an array, you will put it into an ordered linked list.
Registrations: Same as assignment 2.

Your cs1713p4.c code

  • You should probably copy your cs1713p2.c into a file named cs1713p3.c.
  • It does the following includes:
    • #include lt;stdio.hgt;
    • #include lt;string.hgt;
    • #include quot;cs1713p3.hquot;
  • You must update or write the following routines (These are suggestions to help you organize your code):
    • printCourses - prints the course information in the list (most of this is in program #2 in array form) While printing a course you must also print the courses waitlist.
      • printWaitlist - if you’re doing the extra credit this function prints the waitlist for a course, each student on the waitlist should have their Full Name, Major and student Id displayed (example output below).
    • getCourses - should now insert the course into a linked list (most of this is in program #2 in array form)
    • processRegistrations - processes the various registration requests (most of this is in program #1 in array form) While processing the registrations you must now add students to the waitlist if you’re doing the extra credit.
    • a function to find a Course Id in the linked list. You will use this in your functions (most of this is in program #1 in array form).
    • a function to insert a Course into the linked list. You will use this in getCourses.
    • a function to insert a Student into a courses waitlist. You will use this in processRegistrations

Please review the cs1713p3.h include file. Most of this assignment is converting array code into linked list code, I suggest you complete all the conversions before trying to finish the new features.

Compiling

Compile the code using

gcc -g -o register cs1713p3.c 

Executing the p4 executable:

register -c p3Courses.txt -s studentReg.txt 

Turn in a zip file containing:

Your .h file (if it changed) Your .c code Your output based on the data provided. 
联系我们 - QQ: 99515681 微信:codinghelp
程序辅导网!