Page 1 of 1

Implement your design for a simple game. You must use method decomposition. The data can be related to any topic of int

Posted: Fri May 20, 2022 1:37 pm
by answerhappygod
Implement your design for a simple
game.
You must use method decomposition.
The data can be related to any topic of interest to you but there
should be a collection of data.
Organize the data and methods into appropriate Blueprint
classes. For example, if it's a card game, then a Deck has
cards, i.e. cards would be an attribute of Deck, and the data type
of cards could be an array of Card, where each Card has a rank and
a suit.
Similarly, a Game has players, so players can be an attribute of
a Game class. A Player may have a choice or a set of cards, a
name, etc. depending on the needs of your application.
Other examples:
Your program will create the collection, and process it in an
appropriate way, e.g. search MovieCollection for a Movie based on
some criteria input by the user (e.g. a particular actor) and
output the result.
Document your program appropriately as we
discussed. The main class should be documented with: the
purpose of the application, inputs, outputs, and
assumptions.
Each method should be documented with: purpose, preconditions
and postconditions; describe each parameter (along with any
constraints on them) and what it returns (if anything), as well as
any assumptions, like we discussed during 3/8 lecture
(exercise on evaluating and revising/clarifying the documentation
of a method).
For this assignment, the documentation style of Javadoc is
preferred but not required.