(Key) Csa U8l1 Project Planning Extra Practice
(Key) Csa U8l1 Project Planning Extra Practice
1
AP Exam Prep
The following code segment is intended to return the location of a target element in an ArrayList.
Which of the following conditions will cause the given code segment to not work as intended?
D. The size of the ArrayList is less than the expected number of elements.
2
Extra Practice
Do This: Based on the system requirements below, create a prioritized list of the first 8 items needed to be
developed to create a chess game.
Prioritized List:
1. Create a UML diagram to outline the attributes and methods needed in the
system.
2. Develop the Game class (i.e. the game engine for the chess game) - This class
will control the flow of the game and keep track of the state of the game,
including turns, moves, and final results of the game.
3. Develop a Square class - Each Square will represent one of the 64 squares on
the game board and will keep track of what pieces are actively positioned on it.
4. Develop the Board class - Board will contain 64 Square instances to represent
the 64 spaces on the game board.
5. Develop the Player class. - This class will store information pertaining to the
participant of the game.
6. Develop the Piece class. - This class will be used to represent the pieces on the
game board. It will encapsulate any shared behaviors between the 8 pieces and
will likely serve as a superclass.
7. Develop subclasses for each piece. - For each piece type on the gameboard,
create a class that inherits from the Pieces class.
8. Create a Move class or move() methods - This will represent a move in the
game and will validate if a selected move is valid or captures a piece.