https://github.com/julianamancera/labassign1_strategy-pattern
Software Engineering 2 - Strategy Pattern: Laboratory Assignment 1
https://github.com/julianamancera/labassign1_strategy-pattern
game-app software-engineering strategy-pattern
Last synced: 10 months ago
JSON representation
Software Engineering 2 - Strategy Pattern: Laboratory Assignment 1
- Host: GitHub
- URL: https://github.com/julianamancera/labassign1_strategy-pattern
- Owner: JulianaMancera
- Created: 2025-02-11T04:15:33.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2025-02-11T08:30:00.000Z (10 months ago)
- Last Synced: 2025-02-11T08:39:22.005Z (10 months ago)
- Topics: game-app, software-engineering, strategy-pattern
- Language: Java
- Homepage:
- Size: 6.84 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# LabAssign1_Strategy-Pattern
## Problem scenario:
### Suppose we have three types of characters in a GameApp:
**1. Knight:** Attacks with a sword; uses 3 strategies to defend (shield, dodge, magic barrier)
**2. Wizard:** Casts spells; uses magic barrier to defend
**3. Archer:** Shoots arrows; uses dodge to to defend
### Implement two types of Strategy:
**A. DefenseStrategy**
1. Shield
2. Dodge
3. CreateMagic
**B. AttackStrategy**
1. CastSpell
2. ShootArrow
3. SwingSword
## UML Class Diagram:
