Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- Java API design does not need to be thorough in implementation.
- Pseudocode or abstract class is enough for complex components.
- The goal is to show:
- - Each use case in the spec is accounted for
- - It's clear how to create the different use case via documentation
- - How the answer is stored
- */
- public class GCCardPatterns {
- // Initial placement of the cards, also the correct answer
- List<Integer> placement
- // Array containing images of each card
- List<QMComponent> images
- // Boolean to display arrows under the row; default false
- boolean displayArrows = false
- /**
- * Main constructor
- * @param placement: Array of integers detailing placement of cards
- * @param images: Array of QMComponents to be displayed
- * ... detailed explanation of each param and how its used in API
- */
- GCCardPatterns(
- List<Integer> placement,
- List<QMComponent> images
- ) {
- // assign everything
- }
- // Use this for the case you want arrows under rows
- GCCardPatterns displayArrows() {
- this.displayArrows = true;
- return this;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement