Thread: Need some help checking Prerequisite courses

  1. #1
    Registered User
    Join Date
    Apr 2012
    Posts
    4

    Need some help checking Prerequisite courses

    Hey Guys, Im working on some homework and need some help

    We have 2 CSV Files that we will be working from

    One file has the Name of student, and courses hes taken
    The other file has Class To Be Taken, and Prerequisites

    Basically What I need to do is
    If the First File has
    Bob, A, B, C

    and in the second file
    D, A, B,C

    I would output, Bob Took A, B, C
    and Bob is Eligible for D


    I am supposed to use Data Structures so what would be the best way to get started in this

    So far in my program ive read in both files just using file input and strtok to separate stuff up

    Current output looks something like this:

    Eric took MATH 1426, CSE 1310, CSE 2315, CSE 1320,
    and is eligible for




    To Take: CSE 1320
    PreReq: CSE 1310


    To Take: CSE 2315
    PreReq: CSE 1310 MATH 1426


    To Take: CSE 1325
    PreReq: CSE 1320 CSE 1310


    To Take: CSE 2312
    PreReq: CSE 1320 CSE 1310


    To Take: CSE 2320
    PreReq: CSE 2315 CSE 1320 CSE 1310 MATH 1426


    To Take: CSE 3310
    PreReq: CSE 1325 CSE 2320 CSE 2315 CSE 1320 CSE 1310 MATH 1426

  2. #2
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,413
    What data structure do you have in mind?
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. any c courses in the UK?
    By David_Baratheon in forum C Programming
    Replies: 20
    Last Post: 02-06-2012, 05:38 AM
  2. How do I add VSTO as a prerequisite to my .NET setup?
    By euroazn in forum C# Programming
    Replies: 2
    Last Post: 07-14-2010, 07:44 AM
  3. Java courses (which to take)?
    By cpjust in forum Tech Board
    Replies: 2
    Last Post: 03-07-2009, 03:47 AM
  4. OS courses
    By xds4lx in forum A Brief History of Cprogramming.com
    Replies: 3
    Last Post: 10-07-2002, 10:54 PM
  5. 'C' courses
    By Unregistered in forum C Programming
    Replies: 0
    Last Post: 02-04-2002, 11:01 AM