Veamos el principio de diseño "Tell, don't ask" ("Dilo, no preguntes"), que nos permitirá una interacción entre objetos con un menor acoplamiento y una lógica general mejor distribuida.
Link al artículo de Martin Fowler: https://martinfowler.com/bliki/TellDo...
Descargá el código de aquí: https://github.com/CharlyCimino/tell-...
🙌 ¡APOYÁ AL CANAL! Si te gusta mi contenido, invitame un cafecito 😁
➡️ Desde Argentina: https://cafecito.app/charlycimino
➡️ Fuera de Argentina: https://paypal.me/charlycimino
📌 Dejá tu comentario 📝, dale 'like' 👍, suscribite al canal 👥 y activá la campanita 🔔 ¡GRACIAS!
🤳 ¡Seguime!
🌏WEB PERSONAL: http://charlycimino.com 🌏
🌎INSTAGRAM: / charlycimino 🌏
🌍FACEBOOK: / charlyycimino 🌏
🌏LINKEDIN: / charlycimino 🌏
🌏GITHUB: https://github.com/CharlyCimino 🌏
🌏TWITCH: / charlycimino 🌏
🌏PATREON: / charlycimino 🌏
0:00 Intro
2:00 Presentando el ejemplo
2:56 Lógica para acelerar motor sin "Tell, don't ask"
7:04 Agregar un método 'acelerar' a la clase Auto
9:52 Agregar un método 'acelerar' a la clase Motor
12:44 No ser fundamentalista: los getters siguen sirviendo
14:17 Cierre
#POO #Java #NetBeans