40 likes | 102 Views
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. Hangman PBL: Learning Objectives. Understanding the structural relationships between : Code
E N D
Hangman: apps, webpages,adverts,scams, …but usuallyjust a fun game • Variations: • Clues/Themes • Number of errors • Types of error • Real-time • Arcade style/Interactive • Multiplayer CSC7302: Testing & Metrics
Hangman PBL: Learning Objectives • Understanding the structural relationshipsbetween: • Code • Test (code) • Problem/Requirements • Can we have objective measurementsthatcorrelatewith the quality of code: • Correctness • Understandibility/Maintainability/Testability • Understand the impact of OO on the quality of the code and tests • Composition • Inheritance • Polymorphism CSC7302: Testing & Metrics
HangmanProblem • You are to produce multiple versions of the hangmangame (all in Java): • Unstructured (non OO): 1 class and 1 method • You can use standard library classes but are allowed to defineonly one • class and one method of yourown • Overlystructured (too OO): over-use of high-level OO programming concepts • Toomuchinheritance and/or composition and/or … • Well-designed(perfectly OO): a solution thatis as high-quality as youcan manage You must produceat least one examplefromeach of thesethree types of solution (but may have multiple versions of each type) • DevelopmentRules: • All versions must passexactly the same set of tests. • The tests shouldbedevelopedbefore the solutions are coded. • The test code canbestructured in whateverwayyouwish but it must not containany code uponwhich the correct functioning of the gamedepends CSC7302: Testing & Metrics
HangmanProblem • All remaining sessions (from me) are built on top of thisproblemsoyou must have solutions ASAP (individually or collectively): • Today – great • Beforenext class – fine • End of next class – the practicallimit • Wecannotproceedunlessyourdifferent versions all pass the same test code, and the test code isbothcomplete and consistent with respect to the gamerules. • Note: please document the order in whichyoudevelopyour solutions. This willbe important in ourlateranalysis. CSC7302: Testing & Metrics