Skip to content

Commit

Permalink
Cambiados nombres de mensajes multiplicar dividir
Browse files Browse the repository at this point in the history
  • Loading branch information
Melzr committed May 31, 2021
1 parent 4face49 commit 7c3b0e0
Showing 1 changed file with 64 additions and 64 deletions.
128 changes: 64 additions & 64 deletions 03-Numeros/TP_Numeros_Parte2.st
Original file line number Diff line number Diff line change
Expand Up @@ -346,38 +346,38 @@ beAddedToFraccion: aFraccionAugend

self subclassResponsibility ! !

!Numero methodsFor: 'private' stamp: 'HernanWilkinson 5/7/2016 22:48'!
invalidNumberType
!Numero methodsFor: 'private' stamp: 'ML 5/30/2021 19:39:38'!
divideEntero: anEnteroDividend

self error: self class invalidNumberTypeErrorDescription! !
self subclassResponsibility ! !

!Numero methodsFor: 'private' stamp: 'ML 5/28/2021 19:28:48'!
substractFromEntero: anEnteroMinuend
!Numero methodsFor: 'private' stamp: 'ML 5/30/2021 19:40:38'!
divideFraccion: aFraccionDividend

self subclassResponsibility ! !

!Numero methodsFor: 'private' stamp: 'ML 5/28/2021 19:28:33'!
substractFromFraccion: aFraccionMinuend
!Numero methodsFor: 'private' stamp: 'HernanWilkinson 5/7/2016 22:48'!
invalidNumberType

self subclassResponsibility ! !
self error: self class invalidNumberTypeErrorDescription! !

!Numero methodsFor: 'private' stamp: 'ML 5/28/2021 19:28:13'!
useAsDivisorToDivideEntero: anEnteroDividend
!Numero methodsFor: 'private' stamp: 'ML 5/30/2021 19:40:59'!
multiplyEntero: anEnteroMultiplier

self subclassResponsibility ! !

!Numero methodsFor: 'private' stamp: 'ML 5/28/2021 19:27:57'!
useAsDivisorToDivideFraccion: aFraccionDividend
!Numero methodsFor: 'private' stamp: 'ML 5/30/2021 19:41:12'!
multiplyFraccion: aFraccionMultiplier

self subclassResponsibility ! !

!Numero methodsFor: 'private' stamp: 'ML 5/28/2021 19:27:40'!
useAsMultiplicandToMultiplyEntero: anEnteroMultiplier
!Numero methodsFor: 'private' stamp: 'ML 5/28/2021 19:28:48'!
substractFromEntero: anEnteroMinuend

self subclassResponsibility ! !

!Numero methodsFor: 'private' stamp: 'ML 5/28/2021 19:27:18'!
useAsMultiplicandToMultiplyFraccion: aFraccionMultiplier
!Numero methodsFor: 'private' stamp: 'ML 5/28/2021 19:28:33'!
substractFromFraccion: aFraccionMinuend

self subclassResponsibility ! !

Expand All @@ -404,10 +404,10 @@ Numero subclass: #Entero
poolDictionaries: ''
category: 'Numeros-Parte2-Ejercicio'!

!Entero methodsFor: 'arithmetic operations' stamp: 'ML 5/28/2021 18:56:41'!
!Entero methodsFor: 'arithmetic operations' stamp: 'ML 5/30/2021 19:42:30'!
* aMultiplier

^aMultiplier useAsMultiplicandToMultiplyEntero: self
^aMultiplier multiplyEntero: self
! !

!Entero methodsFor: 'arithmetic operations' stamp: 'ML 5/27/2021 23:37:53'!
Expand All @@ -421,10 +421,10 @@ Numero subclass: #Entero
^aSubtrahend substractFromEntero: self
! !

!Entero methodsFor: 'arithmetic operations' stamp: 'ML 5/28/2021 00:06:36'!
!Entero methodsFor: 'arithmetic operations' stamp: 'ML 5/30/2021 19:41:44'!
/ aDivisor

^aDivisor useAsDivisorToDivideEntero: self. ! !
^aDivisor divideEntero: self. ! !

!Entero methodsFor: 'arithmetic operations' stamp: 'HAW 9/24/2018 08:47:50'!
fibonacci
Expand Down Expand Up @@ -503,11 +503,31 @@ beAddedToFraccion: aFraccionAugend

^((self * aFraccionAugend denominator + aFraccionAugend numerator) / aFraccionAugend denominator). ! !

!Entero methodsFor: 'arithmetic operations - private' stamp: 'ML 5/30/2021 19:41:44'!
divideEntero: anEnteroDividend

^Fraccion with: anEnteroDividend over: self ! !

!Entero methodsFor: 'arithmetic operations - private' stamp: 'ML 5/30/2021 19:42:16'!
divideFraccion: aFraccionDividend

^(aFraccionDividend numerator / (aFraccionDividend denominator * self))! !

!Entero methodsFor: 'arithmetic operations - private' stamp: 'HernanWilkinson 5/7/2016 21:00'!
greatestCommonDivisorWith: anEntero

^self class with: (value gcd: anEntero integerValue)! !

!Entero methodsFor: 'arithmetic operations - private' stamp: 'ML 5/30/2021 19:42:30'!
multiplyEntero: anEnteroMultiplier

^self class with: (anEnteroMultiplier integerValue * self integerValue)! !

!Entero methodsFor: 'arithmetic operations - private' stamp: 'ML 5/30/2021 19:42:46'!
multiplyFraccion: aFraccionMultiplier

^(self * aFraccionMultiplier numerator) / aFraccionMultiplier denominator ! !

!Entero methodsFor: 'arithmetic operations - private' stamp: 'ML 5/28/2021 19:16:09'!
substractFromEntero: anEnteroMinuend

Expand All @@ -518,26 +538,6 @@ substractFromFraccion: aFraccionMinuend

^((aFraccionMinuend numerator - (self * aFraccionMinuend denominator)) / aFraccionMinuend denominator) ! !

!Entero methodsFor: 'arithmetic operations - private' stamp: 'ML 5/28/2021 19:17:22'!
useAsDivisorToDivideEntero: anEnteroDividend

^Fraccion with: anEnteroDividend over: self ! !

!Entero methodsFor: 'arithmetic operations - private' stamp: 'ML 5/28/2021 19:17:12'!
useAsDivisorToDivideFraccion: aFraccionDividend

^(aFraccionDividend numerator / (aFraccionDividend denominator * self))! !

!Entero methodsFor: 'arithmetic operations - private' stamp: 'ML 5/28/2021 19:17:03'!
useAsMultiplicandToMultiplyEntero: anEnteroMultiplier

^self class with: (anEnteroMultiplier integerValue * self integerValue)! !

!Entero methodsFor: 'arithmetic operations - private' stamp: 'ML 5/28/2021 19:16:50'!
useAsMultiplicandToMultiplyFraccion: aFraccionMultiplier

^(self * aFraccionMultiplier numerator) / aFraccionMultiplier denominator ! !

"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- "!

!classDefinition: 'Entero class' category: 'Numeros-Parte2-Ejercicio'!
Expand All @@ -564,10 +564,10 @@ Numero subclass: #Fraccion
poolDictionaries: ''
category: 'Numeros-Parte2-Ejercicio'!

!Fraccion methodsFor: 'arithmetic operations' stamp: 'ML 5/28/2021 19:02:29'!
!Fraccion methodsFor: 'arithmetic operations' stamp: 'ML 5/30/2021 19:44:10'!
* aMultiplier

^aMultiplier useAsMultiplicandToMultiplyFraccion: self! !
^aMultiplier multiplyFraccion: self! !

!Fraccion methodsFor: 'arithmetic operations' stamp: 'ML 5/28/2021 00:06:55'!
+ anAdder
Expand All @@ -580,10 +580,10 @@ Numero subclass: #Fraccion
^aSubtrahend substractFromFraccion: self
! !

!Fraccion methodsFor: 'arithmetic operations' stamp: 'ML 5/28/2021 00:10:30'!
!Fraccion methodsFor: 'arithmetic operations' stamp: 'ML 5/30/2021 19:43:29'!
/ aDivisor

^ aDivisor useAsDivisorToDivideFraccion: self! !
^ aDivisor divideFraccion: self! !


!Fraccion methodsFor: 'comparing' stamp: 'HernanWilkinson 5/7/2016 20:42'!
Expand Down Expand Up @@ -659,6 +659,26 @@ beAddedToFraccion: aFraccionAugend

^newNumerator / newDenominator! !

!Fraccion methodsFor: 'arithmetic operations - private' stamp: 'ML 5/30/2021 19:43:17'!
divideEntero: anEnteroDividend

^(anEnteroDividend * denominator ) / numerator ! !

!Fraccion methodsFor: 'arithmetic operations - private' stamp: 'ML 5/30/2021 19:43:29'!
divideFraccion: aFraccionDividend

^((aFraccionDividend numerator * denominator) / (aFraccionDividend denominator * numerator))! !

!Fraccion methodsFor: 'arithmetic operations - private' stamp: 'ML 5/30/2021 19:43:43'!
multiplyEntero: anEnteroMultiplier

^(anEnteroMultiplier * numerator) / denominator ! !

!Fraccion methodsFor: 'arithmetic operations - private' stamp: 'ML 5/30/2021 19:44:09'!
multiplyFraccion: aFraccionMultiplier

^(aFraccionMultiplier numerator * numerator) / (aFraccionMultiplier denominator * denominator)! !

!Fraccion methodsFor: 'arithmetic operations - private' stamp: 'ML 5/28/2021 19:25:01'!
substractFromEntero: anEnteroMinuend

Expand All @@ -674,26 +694,6 @@ substractFromFraccion: aFraccionMinuend

^newNumerator / newDenominator! !

!Fraccion methodsFor: 'arithmetic operations - private' stamp: 'ML 5/28/2021 19:24:50'!
useAsDivisorToDivideEntero: anEnteroDividend

^(anEnteroDividend * denominator ) / numerator ! !

!Fraccion methodsFor: 'arithmetic operations - private' stamp: 'ML 5/28/2021 19:24:38'!
useAsDivisorToDivideFraccion: aFraccionDividend

^((aFraccionDividend numerator * denominator) / (aFraccionDividend denominator * numerator))! !

!Fraccion methodsFor: 'arithmetic operations - private' stamp: 'ML 5/28/2021 19:24:29'!
useAsMultiplicandToMultiplyEntero: anEnteroMultiplier

^(anEnteroMultiplier * numerator) / denominator ! !

!Fraccion methodsFor: 'arithmetic operations - private' stamp: 'ML 5/28/2021 19:24:21'!
useAsMultiplicandToMultiplyFraccion: aFraccionMultiplier

^(aFraccionMultiplier numerator * numerator) / (aFraccionMultiplier denominator * denominator)! !

"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- "!

!classDefinition: 'Fraccion class' category: 'Numeros-Parte2-Ejercicio'!
Expand Down

0 comments on commit 7c3b0e0

Please sign in to comment.