Created
February 8, 2013 06:45
-
-
Save paranoiacblack/4737137 to your computer and use it in GitHub Desktop.
CS12 SI Lab 5
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "course.h" | |
Course::Course() {} | |
Course::Course(const string& courseID, const string& callNo, | |
const string& course_name, const string& course_type, | |
const string& days) | |
: courseID(courseID), callNo(callNo), course_name(course_name), | |
course_type(course_type), days(days) { | |
} | |
string Course::get_courseID() const { | |
return courseID; | |
} | |
void Course::set_courseID(const string& courseID) { | |
this->courseID = courseID; | |
} | |
string Course::get_callNo() const { | |
return callNo; | |
} | |
void Course::set_callNo(const string& callNo) { | |
this->callNo = callNo; | |
} | |
string Course::get_course_name() const { | |
return course_name; | |
} | |
void Course::set_course_name(const string& course_name) { | |
this->course_name = course_name; | |
} | |
string Course::get_course_type() const { | |
return course_type; | |
} | |
void Course::set_course_type(const string& course_type) { | |
this->course_type = course_type; | |
} | |
string Course::get_days() const { | |
return days; | |
} | |
void Course::set_course_days(const string& days) { | |
this->days = days; | |
} | |
vector<string> Course::get_prereqs() const { | |
return prereqs; | |
} | |
// Similarly, probably better to take in a course object to add a prereq. | |
void Course::add_prereq(const string& prereq) { | |
prereq.push_back(prereq); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef __COURSE_H__ | |
#define __COURSE_H__ | |
#include <iostream> | |
#include <vector> | |
using namespace std; | |
class Course { | |
private: | |
string courseID; | |
string callNo; | |
string course_name; | |
string course_type; | |
string days; | |
vector<string> prereqs; | |
// Might be better as a vector of courses? How would you do that? | |
public: | |
Course(); | |
Course(const string& courseID, const string& callNo, | |
const string& course_name, const string& course_type, | |
const string& days); | |
string get_courseID() const; | |
void set_courseID(const string& courseID); | |
string get_callNo() const; | |
void set_callNo(const string& callNo); | |
string get_course_name() const; | |
void set_course_name(const string& course_name);; | |
string get_course_type() const; | |
void set_course_type(const string& course_type); | |
string get_days() const; | |
void set_days(const string& days); | |
vector<string> get_prereqs() const; | |
// Similarly, probably better to take in a course object to add a prereq. | |
void add_prereq(const string& prereq); | |
}; | |
#endif // __COURSE_H__ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CS005 1 Intro_to_Computer_Programming LEC TR | |
CS005 2 Intro_to_Computer_Programming LAB R | |
CS006 3 World_wide_web LEC TR | |
CS006 4 World_wide_web LAB F | |
CS008 5 Intro_to_Computing LEC TR | |
CS008 6 Intro_to_Computing LAB M | |
CS010 7 Intro_to_Computer_Science LEC MWF | |
CS010 8 Intro_to_Computer_Science LAB M | |
CS011 9 Intro_to_Discrete_Structures LEC TR | |
CS011 10 Intro_to_Discrete_Structures DIS R | |
CS012 11 Intro_to_CS_II LEC MWF | |
CS012 12 Intro_to_CS_II LAB M | |
CS014 13 Intro_Data_Structures LEC MWF | |
CS014 14 Intro_Data_Structures LAB M | |
CS030 15 Intro_To_Computational LEC MWF | |
CS030 16 Intro_To_Computational LAB W | |
CS061 17 Machine_Org_Assembly LEC TR | |
CS061 18 Machine_Org_Assembly LAB T | |
CS100 19 Software_Construction LEC TR | |
CS100 20 Software_Construction LAB M | |
CS111 21 Discrete_Structures LEC TR | |
CS111 22 Discrete_Structures DIS F | |
CS120A 23 Intro_to_Embedded_Systems LEC W | |
CS120A 24 Intro_to_Embedded_Systems LAB MW | |
CS120B 25 Intro_to_Embedded_Systems_II LEC R | |
CS120B 26 Intro_to_Embedded_Systems_II LAB WF | |
CS141 27 Intermediate_Data_Structures LEC TR | |
CS141 28 Intermediate_Data_Structures LAB T | |
CS150 29 Automata_and_Formal_Languages LEC TR | |
CS150 30 Automata_and_Formal_Languages DIS M |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CS012: CS010 | |
CS014: CS012 CS010 | |
CS061: CS010 | |
CS100: CS014 CS012 CS010 | |
CS111: CS011 | |
CS120A: CS061 | |
CS120B: CS120A CS061 | |
CS141: CS014 CS111 | |
CS150: CS011 CS111 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment