Criando uma Classe Retângulo com Encapsulamento - Curso Python POO: Desafio 31

Neste vídeo você vai resolver o Desafio 31 de Programação Orientada a Objetos (POO) em Python, desenvolvendo uma classe Retângulo totalmente encapsulada e utilizando os recursos modernos da linguagem, como @property, getters, setters e validação automática de atributos.

Durante a implementação, você aprenderá como proteger os dados internos de um objeto, impedir valores inválidos e criar propriedades inteligentes que tornam seu código mais seguro, organizado e profissional.

Além disso, o projeto trabalha diretamente com conceitos de geometria, permitindo calcular a área de um retângulo a partir de sua base e altura, mostrando na prática como objetos podem representar entidades do mundo real.

⏱️ Assuntos abordados na Aula:
00:00 - Apresentação do exercício e demonstração do resultado final
01:33 - Introdução ao desafio e objetivo do encapsulamento
03:41 - Criação da classe Retângulo e do construtor
05:02 - Implementação de properties, getters e setters
06:29 - Validação dos atributos base e altura
07:41 - Testando atribuições e tratamento de erros
09:06 - Fazendo o construtor utilizar atributos validados
10:24 - Criando a propriedade medidas
11:45 - Tratamento de exceções com try/except
13:28 - Atribuição de medidas usando tuplas
16:08 - Cálculo automático da área
18:35 - Como melhorar o projeto utilizando herança

Seja membro deste canal e ganhe benefícios:
https://www.youtube.com/channel/UCrWvhVmt0Qac3HgsjQK62FQ/join

Acompanhe o módulo 1 do Curso de Python
== https://youtube.com/playlist?list=PLHz_AreHm4dlKP6QQCekuIPky1CiwmdI6&si=2vA5CAXxVCFFGFn6

Acompanhe o módulo 2 do Curso de Python
== https://youtube.com/playlist?list=PLHz_AreHm4dk_nZHmxxf_J0WRAqy5Czye&si=Ib8gp0Y5HbIGo4ju

Acompanhe o módulo 3 do Curso de Python
== https://youtube.com/playlist?list=PLHz_AreHm4dksnH2jVTIVNviIMBVYyFnH&si=_LooOSV_sgW9Qdcu

Acompanhe o módulo 4 do Curso de Python
== https://youtube.com/playlist?list=PLHz_AreHm4dn_RXXoa3Ameh77f95Hgwv3&si=lEB9NW78JoxTLhhJ

Siga nosso canal de Cortes:
== Acesse: @CursoemVideoCortes

Ouça o nosso Podcast Experience:
== https://youtube.com/playlist?list=PLHz_AreHm4dlAL49NfFvf7lUP2jrcMlYQ&si=m9MdtJHSUKUwoPmN

Curso em Vídeo
Seja um apoiador: http://cursoemvideo.com/apoie
Doe Bitcoins: 18A9Se4FK2hSsDT7xZ7n5FdRQ47WCjcftw
Site: http://www.cursoemvideo.com
YouTube: http://www.youtube.com/cursoemvideo
Facebook: http://www.facebook.com/cursosemvideo

Apoio institucional
FAETEC: https://www.faetec.rj.gov.br

Patrocínio
HOSTNET: https://www.hostnet.com.br
ESTUDONAUTA: https://www.estudonauta.com
GAFANHOTOS: https://cursoemvideo.com/apoie

#PythonPOO #CursoPython #OrientacaoaObjetos Receive SMS online on sms24.me

TubeReader video aggregator is a website that collects and organizes online videos from the YouTube source. Video aggregation is done for different purposes, and TubeReader take different approaches to achieve their purpose.

Our try to collect videos of high quality or interest for visitors to view; the collection may be made by editors or may be based on community votes.

Another method is to base the collection on those videos most viewed, either at the aggregator site or at various popular video hosting sites.

TubeReader site exists to allow users to collect their own sets of videos, for personal use as well as for browsing and viewing by others; TubeReader can develop online communities around video sharing.

Our site allow users to create a personalized video playlist, for personal use as well as for browsing and viewing by others.

@YouTubeReaderBot allows you to subscribe to Youtube channels.

By using @YouTubeReaderBot Bot you agree with YouTube Terms of Service.

Use the @YouTubeReaderBot telegram bot to be the first to be notified when new videos are released on your favorite channels.

Look for new videos or channels and share them with your friends.

You can start using our bot from this video, subscribe now to Criando uma Classe Retângulo com Encapsulamento - Curso Python POO: Desafio 31

What is YouTube?

YouTube is a free video sharing website that makes it easy to watch online videos. You can even create and upload your own videos to share with others. Originally created in 2005, YouTube is now one of the most popular sites on the Web, with visitors watching around 6 billion hours of video every month.