Click here to Skip to main content
15,881,715 members
Articles / Desktop Programming / MFC

Genetic Algorithm Library

Rate me:
Please Sign up or sign in to vote.
4.93/5 (175 votes)
7 Apr 2012GPL358 min read 435.7K   34.7K   555  
A framework for genetic algorithms
/*
 * 
 * website: http://www.coolsoft-sd.com/
 * contact: support@coolsoft-sd.com
 *
 */

#include <list>
#include <string>

#pragma once

using namespace std;

class CourseClass;

// Stores data about professor
class Professor
{

private:

	// Professor's ID
	int _id;

	// 
	string _name;

	// List of classes that professor teaches
	list<CourseClass*> _courseClasses;

public:

	// Initializes professor data
	Professor(int id, const string& name);

	// Bind professor to course
	void AddCourseClass(CourseClass* courseClass);

	// Returns professor's ID
	inline int GetId() const { return _id; }

	// Returns professor's name
	inline const string& GetName() const { return _name; }

	// Returns reference to list of classes that professor teaches
	inline const list<CourseClass*>& GetCourseClasses() const { return _courseClasses; }

	// Compares ID's of two objects which represent professors
	inline bool operator ==(const Professor& rhs) const { return _id == rhs._id; }

};

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The GNU General Public License (GPLv3)


Written By
Software Developer
Serbia Serbia
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions