diff --git a/Diploma/maquinaestado.jpg b/Diploma/maquinaestado.jpg new file mode 100644 index 0000000..1150183 Binary files /dev/null and b/Diploma/maquinaestado.jpg differ diff --git a/Diploma/tp4.org b/Diploma/tp4.org new file mode 100644 index 0000000..b2f38f2 --- /dev/null +++ b/Diploma/tp4.org @@ -0,0 +1,52 @@ +#+title: Tp4 + +#+begin_src plantuml :file ejercicioApadaptador.jpg +class Cliente + +class Balanza implements AdaptadorBalanza{ ++ pesar() +} + +interface IAdaptadorBalanza{ ++ pesar() +- balanza: NuevaBalanza +} + +class NuevaBalanza{ ++ leerPeso() +} + +Cliente --> Balanza: Utiliza +IAdaptadorBalanza "*" o--> "1" NuevaBalanza +#+end_src + +#+begin_src plantuml :file tp4.jpg +class Compound{ +# boilingPoint: float +# boilingPoint: float +# meltingPoint: float +# molecularWeight: double +# molecularFormula: string ++ <> Display(): void +} + +class RichCompound extends Compound{ + - chemical: string + - bank: ChemicalDatabank + + RichCompound(string chemical) + + <> Display(): void +} +RichCompound "1" -r-> "1" ChemicalDatabank + +class ChemicalDatabank{ ++ GetCriticalPoint(string compound, string point): float ++ GetMolecularStructure(string compound): stirng ++ GetMolecularWeight(string compound): double +} + +class Program +{ +- compound: Compound +} +Program "1" -l-> "1" Compound +#+end_src diff --git a/Diploma/tp5.org b/Diploma/tp5.org new file mode 100644 index 0000000..db3cdb9 --- /dev/null +++ b/Diploma/tp5.org @@ -0,0 +1,45 @@ +#+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 + ++ <> Deposit(double amount): void ++ <> Withdraw(double amount): void ++ <> PayInterest(): void +} + +class RedState extends State{ +- serviceFee: double ++ RedState(State state) + +- Initialize(): void + ++ <> Deposit(double amount): void ++ <> Withdraw(double amount): void ++ <> PayInterest(): void + +- StateChangeCheck(): void +} + +class SilverState extends State { ++ SilverState(State state) : this(state.Balance, state.Account) ++ SilverState(double balance, Account account) +- Initialize(): void ++ <> void Deposit(double amount) ++ <> Withdraw(double amount): void ++ <> PayInterest(): void +- StateChangeCheck(): void +} +#+end_src + +#+RESULTS: +[[file:maquinaestado.jpg]]