See project outline (ProjectOutline.md).
We encourage collaborating with other students to learn and teach from each other even when he/she is not your partner.
##Submission Submit code and short answers on CSNET separately for each phase. Submit a hardcopy to the TA as well. We will only require a single submission for each pair or individual. ###Deadlines
- Phase 1 - Midnight of Tuesday, November 5th
- Phase 2 and 3 - Midnight of Tuesday, November 19th
##Grading For more details on the work, go to ProjectOutline.md. See SampleSolution.md to get an idea of what to submit.
NOTE: The code created/submitted for this project will need to compile and run using g++.
###Phase 1 - 30%
- Short answers
- Identify at least 4 code smells. - 10%
- For each code smell, remove the code smell using the appropriate refactoring technique. - 10%
- Deliver code that is working. - 10%
###Phase 2 - 30%
- Solution with different types of units without refactoring into inheritance. - 5%
- Refactor solution using inheritance and polymorphism. Add at least two more types of military units. - 10%
- Essay reflecting on the two solutions above. - 15%
- Explain what you did for each?
- If we wanted to add the additional types of military units from part two (where we used inheritance) to part one (no inheritance), what would we have to do?
- When do we want to use one versus the other?
- Other benefits of using polymorphism?
###Phase 3 - 40%
- Deliver a working game. - 20%
- Avoid using code smells! - 10% minus 1% for every code smell we find. This is exercising phase 1.
- Use polymorphism in squad. Have squad only coupled to Military Unit and not coupled (referencing) any sub type of MilitaryUnit. - 10%. This is exercising phase 2.
##Learning and Resources ###Code Smells
- http://www.codinghorror.com/blog/2006/05/code-smells.html
- http://www.industriallogic.com/wp-content/uploads/2005/09/smellstorefactorings.pdf
###Refactoring http://www.refactoring.com/catalog/
- Add/Remove Parameter
- Decompose Conditional
- Encapsulate Field
- Extract Class, Method, Subclass, Superclass
- Form Template Method
- Hide Delegate, Method
- Inline Method
- Push Down / Pull Up Field, Method
- Reduce Scope of Variable
- Rename Method/Class
- Replace Parameter with Method
###UML Class Diagrams Some of the resources use UML class diagrams to explain. http://en.wikipedia.org/wiki/Class_diagram
###Inheritance http://www.cplusplus.com/doc/tutorial/inheritance/ (Inheritance between classes, What is inherited from the base class?) ###Polymorphism http://www.cplusplus.com/doc/tutorial/polymorphism/ ##Contact Us We will be discussing and communicating through primarily Piazza.
Just in case: [email protected], [email protected].