C代写:CS1713LinkedListsUsingPointers


代写数据结构作业,练习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 <stdio.h>
    • #include <string.h>
    • #include "cs1713p3.h"
  • 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.


文章作者: SafePoker
版权声明: 本博客所有文章除特別声明外,均采用 CC BY 4.0 许可协议。转载请注明来源 SafePoker !
  目录