Scope: University Management System
You are expected to develop university management system.
Main Problem: Personal Management
This HW is extended version of HW5 and HW6. That is to say, this homework is also storyteller, but it tells stories of
education systems which are under 3 different philosophies. Actors of the stories are changeable according to types of
education system. There are three types of education systems; namely LiberalEducation, CommunistEducation,
CapitalistEducation. Each Education system has got different university founded, employee given job and different story
told. User of the program will enter one of them and the program tells its story.
1. Your program will expect an input which is the option of one of three-story types; L (liberal), Com
(communist), and Cap(capitalist). When it begins, it will process and prints all story.
2. Program should read txt file, personnellist.txt. It indicates Employee.
3. There is a University
4. University has a template for contribution.
5. Actions should be managed with enumeration.
6. You should separate compilation into header files and implementation files.
Story of Liberals
Story of Kapitalist
Story of Communist
Program tells three different story. Story of liberalist is told in first person narration. Others are told
in third person narration.
In story of liberalist, there are 14 actions coming and one employee who do its best is selected. Story
is told in the mouth of the employee selected. Selected employee should bring max contribution and
have best happiness. S/he complete action as far as possible.
In story of communist, there are 12 actions coming. All jobs is distributed equally to employees. Style of telling
story is like assignments before. Story is told while action is processing.
In story of capitalist, situation is different. 15 actions are in process here. University employs 4 brokers ( one for
each type of employee) for commission. They give job to 2 workers for each segment. While keeping actions,
brokers assign tasks to worker and worked complete action. The effect of assignment is distributed to worker
and broker. Broker gains money and happiness of worker is affected. Unless broker makes money more than a
threshold of money, it fires worker. If happiness of worker is under threshold of happiness, s/he resigns. New
worker will be found. All of these will be told in story.
Need is ResearchAssistant
Need is Officer
Need is Lecturer
Need is Secretary
Start Story of
Tell story while
Employ Broker Employ Worker
Effect Happines of
In Liberal Education System;
– Liberal University is founded. It determines actions before employing process.
– Liberal employee is decided according to actions.
– It does all actions in loop as much as it can do. If it cannot do an action, there will be an
exception which say that.
– Story is told in first person narration.
– Summarization of effects.
Communist system and capitalist system will be done as shown in figure.
UML Class Diagram:
Lecturer ResearchAssistant Secretary Officer
Capitalist employees are kept by a structure like linked list. Root object will be pointed in university
and employees can point other employees.
Employee of liberal university will point the university like assignment 5.
University give money related to contribution.
In communist system, money is distributed equally for each job of action.
In liberal system, money is equal to contribution.
In capitalist system, money = contribution * 3/2 -1 .
Start function will start the story of education. It will be overridden different by universities.
Trick: Abstract Factorial Pattern
In liberal system, story is told like below:
(output)> I see that there is an opportunity for being … (Employee type) in the university. So I am … (Employee
(output)> University has … (Action). I did … (work) . My happiness is … and my money is … . I contribute … to
(output)> University has … (Action). I cannot do that.
(output)> After all, my happiness is … . My money is … . Contribution of university is … .
In capitalist system, story is told like assignment 6.
In communist system, story is told like assignment 5.
• Do not use any elements which is not covered in class.
• Do not submit your code without testing it with several different scenarios.
• Write comments in your code.
• Prepare a Makefile for your programme.
• You are free to define your functions or classes.
• Source code of a complete C++ program. Name of the file should be in this format:
• Example: gokhan_kaya_000000.cpp. Please do not use any Turkish special characters.
• You don’t need to use an IDE for this assignment. Your code will be compiled and run in a command window.
• Your code will be compiled and tested on a Linux machine(Ubuntu). GCC will be used
• Make sure you don’t get compile errors when you issue this command : g++
• A script will be used in order to check the correctness of your results. So, be careful not to violate the
expected output format.
• Provide comments unless you are not interested in partial credit. (If I cannot easily understand your design,
you may loose points.)
• You may not get full credit if your implementation contradicts with the statements in this document.
• (0,24] hours: -20%
• (24,48] hours: -40%
• (48,72] hours: -60%
• (72,-) hours: -100%
• Max Grade : 100.
• Multiple tests(at least 5) will be performed.
All of the followings are possible deductions from Max Grade.
• #define HARD_CODED_VALUES -10.
• No submission: -100. (be consistent in doing this and your overall grade will converge to N/A) (To be specific:
if you miss 3 assignments you’ll get N/A)
• Compile errors: -100.
• Irrelevant code: -100.
• Major parts are missing: -100.
• Unnecessarily long code: -30.
• Using language elements and libraries which are not allowed: -100.
• Not caring about the structure and efficiency: -30. (avoid using hard-coded values, avoid hard-to-follow
expressions, avoid code repetition, avoid unnecessary loops).
• Significant number of compiler warnings: -10.
• Not commented enough: -5. (Comments are in English).
• Source code encoding is not UTF-8 and characters are not properly displayed: -5. (You can use ‘Visual Studio
Code’, ‘Sublime Text’, ‘Atom’ etc. . . Check the character encoding of your text editor and set it to UTF-8).
• Missing or wrong output values: Fails the test.
• Output format is wrong: -30.
• Infinite loop: Fails the test.
• Segmentation fault: Fails the test.
• Fails 5 or more random tests: -100.
• Fails the test: deduction up to 20.
• Prints anything extra: -30.
• Unwanted chars and spaces in output.txt: -30.
• Submission includes files other than the expected: -10.
• Submission does not follow the file naming convention: -10.
• Sharing or inheriting code: -200