CS计算机代考程序代写 javaFx Java UML class diagram:

UML class diagram:
Ball
– xPos: double
– yPos: double – radius: double – xVel: double – yVel: double – colour: Paint
+ Ball( startX: double, startY: double, startRadius: double, colour: Paint) + tick()
+ setxVel( xVel: double)
+ setyVel( yVel: double)
+ getRadius(): double
+ getxPos(): double
+ getyPos(): double
+ getColour(): Paint
+ getxVel(): double
+ getyVel(): double
+ setxPos(xPos: double)
+ setyPos(yPos: double)
+ think()
+ clone(): Ball
<> Cloneable
BallPit
– height: double
– width: double
– balls: List
– tickCount: long = 0
+ BallPit(width: double, height: double)
+ getHeight(): double
+ getWidth(): double
+ tick()
+ getBalls(): List
– checkCollision(ballA:Ball, ballB:Ball): boolean – handleCollision(ballA:Ball, ballB:Ball)
+ addNewBall(color: String)
+ Memento getMemento()
+ setMemento(m: Memento)
App
+ main(args: String[])
+ start(primaryStage: Stage)
Caretaker
– mementoes: List
+ save(m: Memento)
+ load(index: int): Memento + getSize(): int
Memento
– balls: List
– tickCount: long = 0
+ Memento(balls: List , tickCount: long) + getBalls(): List
+ getTickCount(): long
GameWindow
– gc: GraphicsContext
– scene: Scene
– model: BallPit
– statusPanel: StatusPanel
+ GameWindow(model: BallPit) + getScene(): Scene
+ run()
– draw()
StatusPanel
+ initialize(model: BallPit)
javafx.scene.layout.Pane