Категории: Все - polimorfismo - clases - métodos - herencia

по Jorge Luis Gonzalez Siguencia 19 дней назад

18

Conceptos básicos de la programación orientada a objeto

La programación orientada a objetos es un paradigma que organiza el diseño del software en torno a objetos y clases. Las clases son plantillas que definen atributos y métodos específicos, mientras que los objetos son instancias de estas clases.

Conceptos básicos de la programación orientada a objeto

Conceptos básicos de la programación orientada a objeto

The first division between continents was made by ancient Greek navigators, who named them 'landmass, terra firma'.

Generally classified by convention rather than any strict criteria, nowadays seven regions are regarded as continents from a geopolitical point of view.

Encapsulamiento

You can find on this continent:

Permite proteger los datos del acceso directo desde fuera de la clase
POR EJEMPLO

protected

`private

public

Consiste en ocultar los detalles internos de un objeto y exponer solo lo necesario para interactuar con él.

There are 12 countries that make up South America.

Name as many of you can! Don't forget about their capitals.

Clases y objetos

North America has five time zones and it is the only continent with every type of climate.

North America was named after the explorer Amerigo Vespucci and is also known as the 'New World'.

The world's largest sugar exporter among the seven continents - Cuba - also called the 'sugar bowl of the world' is located here.

objeto

The specialty of some animals is they are found only in a particular region and nowhere else in the world. North America is home to many of such amazing animals.

Name at least 6.

yo

Clase

The world's largest freshwater lake by surface area and the third-largest freshwater lake by volume can be found here. It provides a route for the transportation of iron ore, as well as grain and other mined and manufactured materials.

Large cargo vessels called lake freighters, as well as smaller ocean-going freighters, transport these commodities across this lake.

Name this lake.

Es un(Atributos

Polimorfismo:

Australia is the world's smallest continent and is also known as an 'island continent' as it is surrounded by water on all sides.
It includes 14 countries and it is the least populated continent.

Its name comes from the Latin word 'australis' meaning 'southern' because it lies entirely on the south of the equator.

Additional info
Permite que objetos de diferentes clases respondan de manera diferente al mismo mensaje o método
Esto facilita la reutilización de código y la flexibilidad.
Significa "muchas formas".

Out of 14, how many countries you can name?

How about these countries' capitals?

Herencia

Antarctica is not only the coldest place on Earth but also the highest, driest, windiest and emptiest, completely covered with ice.

75% of the world's ice and 70% of the Earth's fresh water is located here.

Summer months of December to February give 24 hours of light, while the winter months of late March to late September are pitch dark the whole day.

There are no permanent inhabitants, except for scientists maintaining research stations in Antarctica.

EJEMPLO
Subclase: Perro (hereda todo de Animal y agrega un atributo específico como raza y un método ladrar).
Superclase: Animal (tiene atributos como nombre, edad, tipo y métodos como comer, dormir).
La subclase hereda las características y comportamientos de la superclase, pudiendo agregar o modificar sus propios elementos.
Permite crear nuevas clases (subclases) basadas en clases existentes (superclases)

The coldest natural temperature ever recorded on Earth was recorded here.

Write it down.