-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathCourseNode.cs
More file actions
61 lines (55 loc) · 1.75 KB
/
CourseNode.cs
File metadata and controls
61 lines (55 loc) · 1.75 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#region Author Information
/*
* Andrue Cashman
* University of Washington Bothell
* Undergraduate Research Winter 2018
* Advisor: Dr. Erika Parsons
* Project: Virtual Student Advisor
*/
#endregion
#region Course Node Information
/*
* Defines the structure of the Course Node that is used by the Course Network
*/
#endregion
#region Libraries and Namespaces
using System.Collections.Generic;
#endregion
namespace Scheduler {
public class CourseNode {
#region Structure Variables
public int courseID { get; set; } //Represents the Unique ID number for a course
public int groupID { get; set; } //Represents the Group ID for the Course
public int prerequisiteID { get; set; } //Represents the Unique ID number for a Prerequisite Course
public List<CourseNode> prereqs { get; set; } //A list of prerequisites
#endregion
#region Constructors
#region Default Constructor
public CourseNode() {
courseID = 0;
groupID = 0;
prerequisiteID = 0;
prereqs = null;
}
#endregion]
#region Two-Parameter Constructor
public CourseNode(CourseNode temp, bool withList) {
courseID = temp.courseID;
groupID = temp.groupID;
prerequisiteID = temp.prerequisiteID;
if (withList && temp.prereqs != null) {
prereqs = temp.prereqs;
} else {
prereqs = null;
}
}
#endregion
#endregion
#region Helper Function
public bool makeNewList() {
prereqs = new List<CourseNode>();
return true;
}
#endregion
}
}