You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Within multiple methods of the Ball class, such as the constructor, we work with two parameters X and Y, which represent a location. Since both are conceptually related, we could encapsulate them in an object, such as Point. The advantages of applying this technique are: improved readability when using a Point object, since the purpose of the X and Y values is clear; easy to change, since if the representation of the location needs to be modified (for example, using polar coordinates instead of cartesian), the change is centralized in Point.
The text was updated successfully, but these errors were encountered:
Within multiple methods of the Ball class, such as the constructor, we work with two parameters X and Y, which represent a location. Since both are conceptually related, we could encapsulate them in an object, such as Point. The advantages of applying this technique are: improved readability when using a Point object, since the purpose of the X and Y values is clear; easy to change, since if the representation of the location needs to be modified (for example, using polar coordinates instead of cartesian), the change is centralized in Point.
![Captura de pantalla 2025-01-12 204239](https://private-user-images.githubusercontent.com/152343973/402409193-5f687847-2a08-4cd0-8b51-5ef7e1762b85.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk5MzU1NjIsIm5iZiI6MTczOTkzNTI2MiwicGF0aCI6Ii8xNTIzNDM5NzMvNDAyNDA5MTkzLTVmNjg3ODQ3LTJhMDgtNGNkMC04YjUxLTVlZjdlMTc2MmI4NS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjE5JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxOVQwMzIxMDJaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT01MzgyYzRkMzZmOGY4YjliMzZhMDk4NTNhNDJjZjU0OTBlMGEyN2I2YThmNWI4MWEzMWVlMWI5MGExMzc3YWI2JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.SYMuXsiOEB3vD8Lr2qKi1gb79SV_HhnMBV1DrvlY-JU)
![Captura de pantalla 2025-01-12 204441](https://private-user-images.githubusercontent.com/152343973/402409203-20c18639-8a79-4bc1-b183-a8ea9d01ab95.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk5MzU1NjIsIm5iZiI6MTczOTkzNTI2MiwicGF0aCI6Ii8xNTIzNDM5NzMvNDAyNDA5MjAzLTIwYzE4NjM5LThhNzktNGJjMS1iMTgzLWE4ZWE5ZDAxYWI5NS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjE5JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxOVQwMzIxMDJaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1mNTM0MTMyNjkyNmMxNmIxNzJmYjJhN2I0NGZiY2I5ZDNjNGM5NWYzYjg1MjY2NTdlYTJkNDY5ZmJlZjNjY2YwJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.K5tNN-tIolbKWXMD51D8Rxcf71vGOM7YyWJnCwSLd-M)
The text was updated successfully, but these errors were encountered: