Project 5

Due Dates (none - example project only)


Familiarity with
  • object-oriented modeling and design
  • SOLID and other design principles
  • event-driven program execution
  • thread-based concurrency
  • Model-View-Controller architecture
  • Android graphics and touch events


In this project, you will implement a simple interactive game as an Android application. The idea is to use your imagination and have lots of fun!

Use this Android Studio Project as the starting point or skeleton code for your game:

Functional Requirements (4 points)

The object of the game is to eliminate as many monsters as possible on a two-dimensional playing field within limited time. Scoring is based on eliminating more monsters in less time.
  • (1) Playing field: 
    • (0.5) The screen is divided into n by m squares
    • (0.5) n and m are chosen based on the device's display size such that the resulting squares can be pressed accurately with the user's finger. 
    • (0.5) Each square has room for up to one monster. (optional extra credit)
  • (2) Monsters: 
    • (0.5) There are k monsters initially. Monsters behave autonomously in the following way: 
    • (1.0) Monsters move around among adjacent squares at random (all eight neighbors are considered adjacent). 
    • (0.5) Over time, Monsters repeatedly alternate between a vulnerable and protected state (shown in yellow versus green); they spend a certain percentage of time in the vulnerable state but alternate in a randomized way.
  • (0.5) Touch interface: Monsters can be eliminated while in the vulnerable state by pressing on (or clicking) the square they occupy.
  • (0.5) The playing field is locked into the preferred orientation to preserve the application state.
  • Levels (extra credit): At higher levels, the number of Monsters goes up, and the proportion of time in the vulnerable state goes down.
  • Display pixel density (extra credit): n and m are chosen by taking the device's pixel density into account such that the resulting squares are about the same physical size on different devices.
  • Rotation (extra credit): the application state is preserved during device rotation.
Further details will be fleshed out per discussion below.

Nonfunctional Requirements (2.5 points)

  • Testing (extra credit)Ensure your application includes comprehensive unit, integration, and functional tests using the techniques from the clickcounter and stopwatch examples where appropriate. (See also At least one of Robolectric tests or Android instrumentation tests (in src/androidTest) should be present.
Further details will be fleshed out per discussion below. 

Written Part/Documentation (2 points)

Please include these deliverables in the doc folder of your project5.
  • (0.5) Provide a brief description of your domain model.
  • (0.25) Use inline comments to document design details in the code.
  • (0.25) Use javadoc comments to document how to use the abstractions (interfaces, classes) you designed.
  • (1.0) Include a brief (300-500 words) report on the design tradeoffs and decisions you made in this project, including
    • MVA versus MVC
    • use of SOLID and other design principles
    • impact on testability
    • concurrency

Grading Criteria

  • Stated percentages for the major categories
  • Stated points for the specific items
  • Total 8.5 points
  • Deductions of up to 1 point for
    • major deviation from the required project folder structure (see stopwatch and clickcounter for examples)
    • inability to run and/or test

How to submit

As the first step in working on this project, one of your larger team members will push the code skeleton to a private Bitbucket repository shared among all of you and your instructor and TA. The name of the repository is cs313413f18groupNp5, where N is your group number from Project 4. When your work is ready to be graded, please notify your instructor and TA via Piazza.