Class Diagram Group Final Lab Exercise UML Andrés Burgos, Angélica Cruz, Cristian Méndez

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

Mars Is Mine - Untitled

Class Diagram Group Final Lab Exercise UML


Andrés Burgos, Angélica Cruz, Cristian Méndez

UML Class Diagram Entities


Game

view

Main

- menu Menu
- register Register
- gameplay Gameplay
- score Score
- screen: int

Player Character Star


+ settings(): void
+ setup(): void
exception + draw(): void MenuMain
Exception1
+ mousePressed(): void
+ keyPressed(): void
Exception2 + keyReleased(): void 1
Exception3

Exception4 1 1 1
1 1 1 1
RegisterMain
NoName NameLenght Win Lose ... ... 1 ... ... Revy Enemy
Register Gameplay
ScoreMain
- app : PApplet - app : PApplet
+ NoName (String + NameLenght (String + Win (String + Lose (String - cp5 :ControlP5 - controlGame Controller
message) message) message) message) - fontText : PFont - game : PImage
- controller ControllerRegister - win, lose : PImage
- register : PImage - posX, screen : int 1 GameplayMain
- correct: boolean - moveScreen, endGame:
- inputs: String [ ] boolean 1 1
- name: String
Score Menu
+ Register (PApplet app) + Gameplay (PApplet app)
+ createText(): void + drawScreen() : void - score : PImage - menu : PImage
+ registerPlayer(): void + revyFall() : void - app : PApplet - app : PApplet
+ drawScreen(): void + winCase() : void - scoreControl ControllerScore
+ button(): int + touchEnemy() : void
+ *gets() & *sets(*):void + ending() : void + Socre(PApplet app) + Menu(PApplet app)
+ button() : int + drawScreen(): void + drawScreen(): void
Exception + getKey(int c) : void + button(): int + button(): int
+ notMove(int c) : void
+ *gets() & *sets(*):void

1 1 1

ControllerRegisterRegister ControllerGameplay ControllerScoreScore

controller

1 1 1

ControllerRegister Controller ControllerScore

- app : PApplet - app : PApplet - app : PApplet


- logic Logic - logic Logic - logic Logic

+ ControllerRegister (PApplet app)


+ registerPlayer(String name): void
+ ControllerScore (PApplet app)
+ drawData(): void
+ sortNames(): void
+ sortTime(): void
+ sortDate(): void
1 + sortScore(): void

+ Controller (PApplet app)


+ loseGame(): void
+ drawGame(): void
+ drawEnemy(): void
+ drawStar(): void
+ getKey(int c): void
+ notMove(int c): void
+ getPosX(): int
+ setPosXEnemy(int c): void
+ isMoving(boolean c): void
+ getPosXEnemy(): int
+ getPosY(): int
+ getXCol(): int
+ fallRevy(boolean c): void
+ getScore(): int
+ isTouch(): boolean
+ setRevyPosX(int posXCollision): void
+ reset(): void

LogicControllerRegister

LogicController

LogicControllerScore

model

1 1 1

Logic ByDate

- PApplet app ByDateLogic


- Logic oneInstance 1
- ByName byname
- ByTime bytime
- ByDate bydate
- Revy revy 1
- LinkedList<Player> player
- ArrayList <Enemy> enemy
- ArrayList <Star> star;
- Name : String
- min: int
- seg: int
- posXEnemy: int ByName
- score: int
- time: boolean ByNameLogic Comparator
EnemyLogic - loseTouch : boolean 1 1
compare(): void
+ Logic(PApplet app): void
... + Logic getInstance(PApplet app): void
+ registerPlayer(): void
+ createStar(): void
+ createEnemy(): void
+ moveEnemy(): void
+ drawEnemy(): void
+ drawGame(): void
RevyLogic 1 + drawStars () : void 1 ByTimeLogic ByTime
+ fallRevy(): void
+ collision(): void
1 1 + newPoint():void
+ paintTime(): void
+ saveGame(): void 1
Enemy Revy + drawData(): void
+ reset(): void
- PApplet app - PApplet app + getKey(): void
- PImage enemyLeft; - PImage revy + notMove(): void
- PImage enemyRight - Pvector position # *gets() & *sets(*):void
- posXEnemy: int - Pvector vel
- posYEnemy: int - Pvector cc
- posSpeedEnemy: int - floor: int
- dir: int - height: int ... ...
- moveX : int - posX: int PlayerLogic
- moveXEnemy : boolean - posY: int
- speed: int
- key: int
+ Enemy():void - move: boolean StarLogic
+ moveEnemy(): void - fall: boolean 1 Comparable
+ run(): void - jump: boolean
# *gets() & *sets(*):void + compareTo():void
Player
+ Revy(): void
+ run(): void
+ move(): void - name: String
+ notMove(): void - date2: String
# *gets() & *sets(*):void - time: String
- date: Date
1 - score: int

Star
+ Player(): void
- PApplet app + drawData: void
<<Interface>> <<Interface>> - PImage star # *gets() &
Paintable Runnable - posXStar: int *sets(*):void
- posYStar: int
+ drawChar(): void - moveXStar: boolean

+ Star (): void


+ draw(): void
+ moveStar() : void
+ run() : void
# *gets() &
*sets(*):void

You might also like