Overview
Players, Pawns, and Storage
In the previous Parcheesi assignment, object diagrams represented particular game objects and activity diagrams represented what happened during a turn. In this assignment, you will add a third UML viewpoint: a class diagram.
A class diagram describes reusable structure. First, you will use Player and Pawn as a fully worked example of how several particular objects can be represented by reusable classes and multiplicity. Then you will transfer that idea to a new part of the game by creating your own small GameBoard–Cell class diagram in Violet. You will finish with a second, very small activity diagram showing game information being saved to persistent storage.
You are not modeling the entire Parcheesi game. The Player–Pawn class diagram is a worked example. Your own class diagram needs only GameBoard and Cell. The storage activity diagram needs only the few actions required to show information moving from a running game to persistent storage.
Task List
- Start With Objects You Already Know
- Study the Worked Player–Pawn Class Example
- Explore GameBoard and Cell Objects
- Plan the GameBoard–Cell Class Model
- Create the GameBoard–Cell Class Diagram in Violet
- Model Saving Game Information
- Compare the Three UML Viewpoints
- Save, Submit, and Revise the Diagrams
-
1. Start With Objects You Already Know
User Story — Describe Players and Their Pawns
As a Parcheesi player, I want the game model to describe players and their pawns so that the same structure can represent different players and game pieces.
Before introducing class diagrams, start with the kind of UML you already used in Parcheesi 0.2: an object diagram. An object diagram shows particular objects that exist in one specific situation.
Step 1 — Read one Player object and four Pawn objects
Object diagram: one particular Player object is linked to four particular Pawn objects. Step 2 — Count the actual objects
- There is exactly one object named redPlayer
- There are four separate Pawn objects: redPawn1, redPawn2, redPawn3, and redPawn4
- The one redPlayer object is connected to each of the four Pawn objects
Objects Show Actual InstancesThe diagram does not need a multiplicity label to tell you there are four pawns. You can count the four actual Pawn objects. This particular game state contains 1 Player object and 4 Pawn objects.
Step 3 — Notice the object-specific values
- redPlayer has the particular Name value Avery
- redPawn1 has Number = 1 and IsAtStart = false
- The other three pawns each have their own current values
Go to topObject Diagram QuestionAn object diagram answers: Which particular objects exist right now, what values do they have, and which objects are linked?
-
2. Study the Worked Player–Pawn Class Example
The previous object diagram showed one particular Player object and four particular Pawn objects. A class diagram compresses that repeated structure into reusable types.
Step 1 — Read the completed class diagram
Class diagram: one reusable Player class is associated with four Pawn instances through the 1-to-4 multiplicity. Step 2 — Compare the worked object and class views
Object diagram Class diagram One particular redPlayer : Player One reusable Player class Four separate Pawn objects are drawn One reusable Pawn class is drawn Current values such as Name = "Avery" Attribute definitions such as Name : string Four actual Player-to-Pawn links are visible Multiplicity expresses the reusable 1 Player to 4 Pawns pattern Worked Example, Not Your Final DiagramYou do not need to recreate Player–Pawn. Use it as an example of the thinking you will apply to a different pair of classes in the next tasks.
Go to topImportant UML DistinctionObject diagrams show actual instances and actual links. Class diagrams show reusable types and associations. Multiplicity belongs to the class-level association.
-
3. Explore GameBoard and Cell Objects
Now transfer the same idea to another familiar part of Parcheesi. The diagram below shows one particular board object and six particular Cell objects.
Step 1 — Read the concrete object state
Concrete example: one GameBoard object contains six particular Cell objects. Step 2 — Identify repeated structure
- Find the one mainBoard : GameBoard object
- Count the six separate Cell objects
- Notice that every Cell object has a Number value
- Notice that every Cell object has an IsSafe true/false value
- Notice that the board has a contains link to each Cell object
Step 3 — Separate object values from reusable definitions
Particular object value Reusable idea to carry forward Name = "Main Board" GameBoard needs a text attribute for its name Number = 1, 2, and so on Cell needs a whole-number attribute IsSafe = true/false Cell needs a true/false attribute Six actual contains links A GameBoard can contain many Cell instances Go to topThe Six Cells Are a Concrete ExampleThis object diagram shows only the six-cell teaching segment. Your class diagram should describe the reusable relationship, not claim that every possible game board always contains exactly six cells.
-
4. Plan the GameBoard–Cell Class Model
Use the object diagram as evidence, then replace the particular objects and values with reusable class information.
Step 1 — Plan the GameBoard class
- Create a reusable class named GameBoard
- Replace the particular value Name = "Main Board" with Name : string
Step 2 — Plan the Cell class
- Create a reusable class named Cell
- Replace the particular Number values with Number : int
- Replace the particular IsSafe values with IsSafe : bool
Step 3 — Use multiplicity for the reusable relationship
The worked Player–Pawn example used an exact multiplicity of 4. For the board model, use * to mean “many.”
The * multiplicity means many instances may participate at that end of an association. - Use relationship label contains
- Use multiplicity 1 at the GameBoard end
- Use multiplicity * at the Cell end
Go to topWhat You Have PlannedYou now have all the pieces needed for the class diagram, but you have not been given the finished GameBoard–Cell diagram. Your next task is to assemble those pieces correctly in Violet.
-
5. Create the GameBoard–Cell Class Diagram in Violet
Build the class diagram you planned. This is the main class-diagram artifact for Parcheesi 0.4.
Step 1 — Create the GameBoard class
- Open Violet and create a new class diagram
- Add a class named GameBoard
- Add Name : string
Step 2 — Create the Cell class
- Add a class named Cell
- Add Number : int
- Add IsSafe : bool
Step 3 — Connect the classes
- Add one association between GameBoard and Cell
- Label the association contains
- Show multiplicity 1 at the GameBoard end
- Show multiplicity * at the Cell end
- Arrange the classes so the relationship and multiplicities are easy to read
Check Your Work
- The diagram contains exactly GameBoard and Cell
- GameBoard contains Name : string
- Cell contains Number : int and IsSafe : bool
- The association is labeled contains
- The association reads as 1 GameBoard contains many Cells
- The diagram shows reusable classes and data types, not six individual Cell objects or current values
Go to topCompare With the Object DiagramThe six-cell object diagram was concrete and repetitive on purpose. Your class diagram should be much smaller because one Cell class can describe all of those Cell objects.
-
6. Model Saving Game Information
User Story — Show a Game Being Saved
As a Parcheesi player, I want the current game information to be saved so that the game state can still exist after the running game closes.
This second diagram is deliberately much smaller than the class diagram work. Its purpose is to show information moving from a running system to persistent storage.
Step 1 — Review a generic storage flow
An activity diagram can show information moving from a running system to persistent storage. Step 2 — Start a Parcheesi storage diagram in Violet
Use this short scaffold to begin the Parcheesi storage activity diagram. Step 3 — Complete the storage flow
- Begin with Parcheesi game is running
- Add Player chooses Save
- Add one action that clearly communicates that the game information is written to persistent storage
- Add a clear ending point
Step 4 — Keep the activity diagram intentionally simple
You do not need file names, file formats, folders, databases, code, or operating-system details. The only important idea is that the information begins in a running system and is written somewhere that can persist after the running game ends.
Check Your Work
- The diagram starts with the game running
- The player chooses Save
- The game information is written to persistent storage
- The flow ends clearly
- No programming or file-system implementation details are included
-
7. Compare the Three UML Viewpoints
You have now used all three UML forms introduced so far in the course.
Step 1 — Match each diagram type to its main question
Diagram Main question Parcheesi example Object diagram What particular objects exist now, and how are they related? mainBoard contains cell1 through cell6 Class diagram What reusable kinds of things exist, what information do they contain, and how are they related? GameBoard contains Name; Cell contains Number and IsSafe; GameBoard contains many Cells Activity diagram What happens next? Player chooses Save, then game information is written to storage Step 2 — Make sure your two new diagrams answer different questions
- Your class diagram should describe reusable structure
- Your storage activity diagram should describe a small process
- Do not add current object values to the class diagram
- Do not add class attributes to the activity diagram
Go to topCheckpoint SummaryYou used Player and Pawn as a worked example of the difference between objects and classes, then created your own GameBoard–Cell class diagram with attributes, data types, an association, and multiplicity. You also created a small activity diagram showing game information moving from a running system to persistent storage.
-
8. Save, Submit, and Revise the Diagrams
Use the same concise submission process you practiced in the previous Parcheesi assignments.
© 2026 Northcentral Technical College
Go to top