Skip to content

Outline

Zachary Wimer edited this page Dec 8, 2016 · 6 revisions

#Algorithm input:

  • The first argument is the file name. In other words, which file should it read the major's requirements from. For example: CSCI-MATH.txt
  • The second argument is a map linking courses to credits. For example "CSCI-1200" could be mapped to 4.
  • Calling the algorithm is as follows
Algo::runAlgo(std::string, std::map<std::string, int>&)

#Algorithm output:

  • The algorithm outputs a pair of maps, each of which contain a comment string and the requirement associated with that comment.
  • The first map corresponds to the general major requirements, the second is more specifically about all things related to HASS requirements
  • It is in the following form:
std::pair< std::map<std::string, std::string>, std::map<std::string, std::string> >

#The language the algorithm will read:

  • This language is a simple language used to list files, and list the option to substitute those files.
  • Classes are denoted as <Major>-<Course number>
  • Every line in this file is added together to make a large condition statement.
    • For example, the following denotes that each of these courses has/must be taken (depending on which file it is in)
CSCI-1100
CSCI-1200
CSCI-2300
CSCI-2500
  • It is important to note that each file MUST end with a newline character. Furthermore, there is no white space anywhere else in the file.

##Special characters

  • The operator || is used as a delimiter to specify that either of these courses must be taken.
    • For example, to show that a student must take either CIVL-1000 or CIVL-1010, as well as CIVL-2000:
CIVL-1000||CIVL-1010
CIVL-2000
  • The character + following denotes that any course of the same major but with a greater or equal number will be accepted.
    • For example, the following says either CSCI-1100 must be taken, or a 2000 or higher level CS course must be taken
		CSCI-1100||CSCI-2000+
  • The next keyword is @:. Thus means that there must be courses in the concentration given.
    • For example, the following says 3 courses are required in concentration A, and 4 in ANY concentration.
		@3:A
		@4:*
  • The @ symbol indicates to the algorithm that a group of classes can be considered for this requirement.
    • Another example:
		@2:LITR
  • The above line indicates that a student must take 2 classes that are located in LITR.txt, which is displayed here:
		LITR-2110
		LITR-2450
		LITR-2770
		LITR-4150
		LITR-4160
  • The # symbol indicates that this class is not used to fill just one requirement.

    • For example, the classes that fulfill the Comm-Intensive requirement can also be used to fill the HASS options and the CS Options.
  • Another symbol is !. Much like in logic, this character indicates that the following class cannot be used to fulfill the requirement.

    • For example:
		CSCI-2000+||!CSCI-2300
  • This file will call on MATH-None.txt and CSCI-None.txt to make sure each of their separate requirements are fulfilled, including free electives.

  • The last keyword allowed is //. This is a comment indicator. Anything written after it up until the next new line will be ignored.

    • Comments must be on their own line.
    • For example, the following is valid:
		// This is all ok to type.
		//Note however, there may be NO white space before the //
		//The slashes must be the first and second characters of the line!
		CSCI-1000 // This is not ok to have

#How the GUI looks:

Clone this wiki locally