November 2011CSC7302: Testing & MetricsL1-HangmanProblem:1 Hangman: apps, webpages,adverts,scams,...

4
November 2011 CSC7302: Testing & Metrics L1-HangmanProblem:1 man: apps, webpages,adverts,scams, …but usually just a fun g Variations: • Clues/Themes Number of errors Types of error • Real-time Arcade style/Interactive • Multiplayer

Transcript of November 2011CSC7302: Testing & MetricsL1-HangmanProblem:1 Hangman: apps, webpages,adverts,scams,...

Page 1: November 2011CSC7302: Testing & MetricsL1-HangmanProblem:1 Hangman: apps, webpages,adverts,scams, …but usually just a fun game Variations: Clues/Themes.

CSC7302: Testing & MetricsNovember 2011 L1-HangmanProblem:1

Hangman: apps, webpages,adverts,scams, …but usually just a fun game

Variations:

• Clues/Themes• Number of errors• Types of error• Real-time• Arcade style/Interactive• Multiplayer

Page 2: November 2011CSC7302: Testing & MetricsL1-HangmanProblem:1 Hangman: apps, webpages,adverts,scams, …but usually just a fun game Variations: Clues/Themes.

CSC7302: Testing & MetricsNovember 2011 L1-HangmanProblem:2

Hangman PBL: Learning Objectives

Understanding the structural relationships between:

• Code• Test (code)• Problem/Requirements

Can we have objective measurements that correlate with the quality of code:

• Correctness• Understandibility/Maintainability/Testability

Understand the impact of OO on the quality of the code and tests

• Composition• Inheritance• Polymorphism

Page 3: November 2011CSC7302: Testing & MetricsL1-HangmanProblem:1 Hangman: apps, webpages,adverts,scams, …but usually just a fun game Variations: Clues/Themes.

CSC7302: Testing & MetricsNovember 2011 L1-HangmanProblem:3

Hangman Problem

You are to produce multiple versions of the hangman game (all in Java):

1. Unstructured (non OO): 1 class and 1 methodYou can use standard library classes but are allowed to define only oneclass and one method of your own

2. Overlystructured (too OO): over-use of high-level OO programming conceptsToo much inheritance and/or composition and/or …

3. Well-designed (perfectly OO): a solution that is as high-quality as you can manage

You must produce at least one example from each of these three types of solution (but may have multiple versions of each type)

Development Rules:• All versions must pass exactly the same set of tests.• The tests should be developed before the solutions are coded.• The test code can be structured in whatever way you wish but it must not contain

any code upon which the correct functioning of the game depends

Page 4: November 2011CSC7302: Testing & MetricsL1-HangmanProblem:1 Hangman: apps, webpages,adverts,scams, …but usually just a fun game Variations: Clues/Themes.

CSC7302: Testing & MetricsNovember 2011 L1-HangmanProblem:4

Hangman Problem

All remaining sessions (from me) are built on top of this problem so you must have solutions ASAP (individually or collectively):

• Today – great• Before next class – fine• End of next class – the practical limit

We cannot proceed unless your different versions all pass the same test code, and the test code is both complete and consistent with respect to the game rules.

Note: please document the order in which you develop your solutions. This will be important in our later analysis.