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

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

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

Post 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.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply