Giter Club home page Giter Club logo

defenseofthecode's Introduction

Defense of the Code

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

  1. Phase 1 - Midnight of Tuesday, November 5th
  2. 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

###Refactoring http://www.refactoring.com/catalog/

Some Common Techniques

  • 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].

defenseofthecode's People

Contributors

zachcannon avatar

Watchers

Long Mai avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.