Yay, my homework works!

notfred

Lifer
Feb 12, 2001
38,241
4
0
So the assignment is to write a program that takes a list of classes and thier prerequisites and figures out the fastest schedule in which you could take all the classes.

Here's the output, based on my schools computer science curriculum:
____________________________________________________

####### COURSE INFO #######
ID Name Prerequisites
01 CSC015 No prereqs
02 CSC020 1
03 CSC028 2
04 CSC035 1
05 CSC060 2
06 CSC130 2, 3
07 CSC131 6
08 CSC132 3, 6
09 CSC133 5, 6
10 CSC134 6
11 CSC136 8
12 CSC137 3, 4, 6
13 CSC138 4, 5, 6
14 CSC139 5, 12

Semester 1: CSC015
Semester 2: CSC020 CSC035
Semester 3: CSC028 CSC060
Semester 4: CSC130
Semester 5: CSC131 CSC132 CSC133 CSC134 CSC137 CSC138
Semester 6: CSC136 CSC139
____________________________________________________

Semester 5 may be a bit optimistic, but hey, the computer doesn't know how studious you are ;)

Look correct to everyone else?
 

notfred

Lifer
Feb 12, 2001
38,241
4
0
Originally posted by: TheBoyBlunder
It looks insane (semester 5, specifically) to me, but otherwise correct.

Just for fun here are the titles of those courses in semester 5:

CSC131: Computer Software Engineering
CSC132: Computing Theory
CSC133: Object-Oriented Computer Graphics Programming
CSC134: Database Management and File Organization
CSC137: Computer Organization
CSC138: Computer Networks and Internets

I think if anyone could take all those classes in one semester and pass, he'd have to be god.

Theoretically, it's possible, though ;)
 

ASK THE COMMUNITY