Object subclass: #Club instanceVariableNames: 'nombre socios fondo tarifaComun tarifaVIP' classVariableNames: '' package: 'tp0.5-102375'! !Club methodsFor: 'initialization' stamp: 'Anonymous 4/25/2020 18:21'! initialize nombre := ''. fondo := 0. socios := Set new. tarifaComun := TarifaComun new. tarifaVIP := TarifaVIP new.! ! !Club methodsFor: 'as yet unclassified' stamp: 'Anonymous 4/25/2020 18:24'! recaudacionTotal ^fondo.! ! !Club methodsFor: 'as yet unclassified' stamp: 'mateo 4/25/2020 18:28'! _agregarSocio: socio socios add: socio.! ! !Club methodsFor: 'as yet unclassified' stamp: 'mateo 4/25/2020 18:44'! cantidadPagadaPor: nombreSocio | socio | socio := self buscarSocioConNombre: nombreSocio. ^socio obtenerGastos.! ! !Club methodsFor: 'as yet unclassified' stamp: 'mateo 4/25/2020 18:28'! agregarSocioVIP: socio. socio establecerTarifa: tarifaVIP. self _agregarSocio: socio.! ! !Club methodsFor: 'as yet unclassified' stamp: 'Anonymous 4/25/2020 18:23'! establecerTarifaSocio: monto tarifaComun establecerMonto: monto.! ! !Club methodsFor: 'as yet unclassified' stamp: 'mateo 4/25/2020 18:30'! nombresSocios ^socios collect: [ :socio | socio obtenerNombre ]. ! ! !Club methodsFor: 'as yet unclassified' stamp: 'mateo 4/25/2020 18:31'! cantidadDeSocios ^socios size.! ! !Club methodsFor: 'as yet unclassified' stamp: 'mateo 4/25/2020 18:38'! recibirPagoDe: nombreSocio | socioBuscado | socioBuscado := socios detect: [ :socio | socio obtenerNombre = nombreSocio ]. fondo := fondo + socioBuscado pagarTarifa.! ! !Club methodsFor: 'as yet unclassified' stamp: 'mateo 4/25/2020 18:28'! agregarSocio: socio. socio establecerTarifa: tarifaComun. self _agregarSocio: socio.! ! !Club methodsFor: 'as yet unclassified' stamp: 'Anonymous 4/25/2020 18:23'! establecerTarifaSocioVIP: monto. tarifaVIP establecerMonto: monto.! ! !Club methodsFor: 'as yet unclassified' stamp: 'mateo 4/25/2020 18:43'! buscarSocioConNombre: nombreSocio ^socios detect: [ :socio | socio obtenerNombre = nombreSocio ].! ! !Club methodsFor: 'as yet unclassified' stamp: 'Anonymous 4/25/2020 18:22'! establecerNombre: unNombre nombre := unNombre.! ! Object subclass: #Socio instanceVariableNames: 'nombre tarifa gastos' classVariableNames: '' package: 'tp0.5-102375'! !Socio methodsFor: 'as yet unclassified' stamp: 'mateo 4/25/2020 18:30'! establecerNombre: unNombre nombre := unNombre.! ! !Socio methodsFor: 'as yet unclassified' stamp: 'mateo 4/25/2020 18:30'! obtenerNombre ^nombre.! ! !Socio methodsFor: 'as yet unclassified' stamp: 'mateo 4/25/2020 18:44'! obtenerGastos ^gastos.! ! !Socio methodsFor: 'as yet unclassified' stamp: 'mateo 4/25/2020 18:41'! pagarTarifa | montoAPagar | montoAPagar := tarifa obtenerMonto. gastos := gastos + montoAPagar. ^montoAPagar. ! ! !Socio methodsFor: 'as yet unclassified' stamp: 'mateo 4/25/2020 18:27'! establecerTarifa: unaTarifa tarifa := unaTarifa.! ! !Socio methodsFor: 'initialization' stamp: 'mateo 4/25/2020 18:41'! initialize nombre := ''. gastos := 0.! ! Object subclass: #Tarifa instanceVariableNames: 'monto' classVariableNames: '' package: 'tp0.5-102375'! !Tarifa methodsFor: 'as yet unclassified' stamp: 'Anonymous 4/25/2020 18:24'! establecerMonto: unMonto monto := unMonto.! ! !Tarifa methodsFor: 'as yet unclassified' stamp: 'mateo 4/25/2020 18:33'! obtenerMonto ^monto.! ! Tarifa subclass: #TarifaComun instanceVariableNames: '' classVariableNames: '' package: 'tp0.5-102375'! Tarifa subclass: #TarifaVIP instanceVariableNames: '' classVariableNames: '' package: 'tp0.5-102375'!