This repository has been archived on 2025-02-09. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
2024-2/Diploma/tp5.org
2024-09-17 09:40:40 -03:00

46 lines
1001 B
Org Mode

#+title: Tp5
#+begin_src plantuml :file maquinaestado.jpg
skinparam classAttributeIconSize 0
abstract class State{
# account: Account
# balance: double
# interest: double
# lowerLimit: double
# upperLimit: double
+ Account: Account
+ Balance: double
+ <<abstract>> Deposit(double amount): void
+ <<abstract>> Withdraw(double amount): void
+ <<abstract>> PayInterest(): void
}
class RedState extends State{
- serviceFee: double
+ RedState(State state)
- Initialize(): void
+ <<override>> Deposit(double amount): void
+ <<override>> Withdraw(double amount): void
+ <<override>> PayInterest(): void
- StateChangeCheck(): void
}
class SilverState extends State {
+ SilverState(State state) : this(state.Balance, state.Account)
+ SilverState(double balance, Account account)
- Initialize(): void
+ <<override>> void Deposit(double amount)
+ <<override>> Withdraw(double amount): void
+ <<override>> PayInterest(): void
- StateChangeCheck(): void
}
#+end_src
#+RESULTS:
[[file:maquinaestado.jpg]]