SlideShare a Scribd company logo
clase interfacefigura
Public Interface Interfacefigura
Function area()
End Interface
CLASE
Public Class Rectangulo
Implements Interfacefigura
Dim base, altura As Double
Public Sub New(ByVal b As Double, ByVal a As Double)
base = b
altura = a
End Sub
Public Function area() Implements Interfacefigura.area
Return base * altura
End Function
End Class
Public Class Triangulo
Implements Interfacefigura
Dim base, altura As Double
Public Sub New(ByVal b As Double, ByVal a As Double)
base = b
altura = a
End Sub
Public Function area() Implements Interfacefigura.area
Return (base * altura) / 2
End Function
End Class
Private Sub botonarea_Click(sender As Object, e As EventArgs)
Handles botonarea.Click
Dim rectangulo As Rectangulo
Dim triangulo As Triangulo
Dim base, altura As Double
base = txtbase.Text
altura = txtaltura.Text
Triangulo = New Triangulo(base, altura)
rectangulo = New Rectangulo(base, altura)
txtareatriangulo.Text = triangulo.area
txtarearectangulo.Text = rectangulo.area
End Sub

More Related Content

PDF
Sketch Plugin & Prototyping Tools
PDF
Data Visualization With R: Learn To Modify Color Of Plots
PDF
Part II: 2-Dimensional Array file name: lab1part2.cpp (10 points) Write a C++...
PPTX
Linked list2
PDF
Data Visualization With R: Learn To Modify Font Of Graphical Parameters
PDF
R Data Visualization: Learn To Add Text Annotations To Plots
PDF
Data Visualization With R: Learn To Modify Title, Axis Labels & Range
PPTX
DATA REPRESENTATION [NUMBER SYSTEM]
Sketch Plugin & Prototyping Tools
Data Visualization With R: Learn To Modify Color Of Plots
Part II: 2-Dimensional Array file name: lab1part2.cpp (10 points) Write a C++...
Linked list2
Data Visualization With R: Learn To Modify Font Of Graphical Parameters
R Data Visualization: Learn To Add Text Annotations To Plots
Data Visualization With R: Learn To Modify Title, Axis Labels & Range
DATA REPRESENTATION [NUMBER SYSTEM]

What's hot (20)

PDF
Data Visualization With R: Learn To Combine Multiple Graphs
PDF
Bcsl 033 data and file structures lab s2-2
PDF
Bcsl 033 data and file structures lab s5-3
PDF
Mi primer map reduce
PDF
Mi primer map reduce
DOCX
Temp conversion
PDF
201801 CSE240 Lecture 14
PDF
XML::Writer::Simple
DOCX
Practical no 4
DOC
C# example (Polymorphesim)
PDF
Day 6 examples
PDF
Let us c(by Yashwant Kanetkar) 5th edition solution chapter 1
PDF
PDF
Switch
PDF
PART 3: THE SCRIPTING COMPOSER AND PYTHON
PDF
PART 4: GEOGRAPHIC SCRIPTING
PDF
R-Excel Integration
Data Visualization With R: Learn To Combine Multiple Graphs
Bcsl 033 data and file structures lab s2-2
Bcsl 033 data and file structures lab s5-3
Mi primer map reduce
Mi primer map reduce
Temp conversion
201801 CSE240 Lecture 14
XML::Writer::Simple
Practical no 4
C# example (Polymorphesim)
Day 6 examples
Let us c(by Yashwant Kanetkar) 5th edition solution chapter 1
Switch
PART 3: THE SCRIPTING COMPOSER AND PYTHON
PART 4: GEOGRAPHIC SCRIPTING
R-Excel Integration
Ad

Viewers also liked (7)

PDF
Revertir la diabetes
PPTX
Assistive technology
PPTX
APRENDIZAJE COLABORATIVO
PPTX
Presentation2
PPTX
En la infancia 1
PPT
Final Intonation Patterns
Revertir la diabetes
Assistive technology
APRENDIZAJE COLABORATIVO
Presentation2
En la infancia 1
Final Intonation Patterns
Ad

Similar to Programasedo (20)

DOCX
CSC139 Chapter 10 Lab Assignment (2)PolymorphismObjectivesIn.docx
PDF
Visual Basic(Vb) practical
PDF
Ec oop f90
PPTX
Colegio municipal
PPT
Chapter 13
PDF
Software Development - Thinking Object's Way
PDF
Refactoring
PDF
Dotnet unit 4
PPTX
Polymorphism and interface in vb.net
DOC
Ejemplo En Gamabas
DOC
ejemplos gambas
PDF
Delphi L06 GDI Drawing
PDF
C++ Windows Forms L08 - GDI P1
DOCX
Comp 220 ilab 7 of 7
PPTX
My favorite slides
DOCX
Comp 220 ilab 7 of 7
PPT
Tooled Composite Design Pattern presentation
PPT
Tooled Composite Design Pattern
DOC
Calculadora
DOC
Calculadora
CSC139 Chapter 10 Lab Assignment (2)PolymorphismObjectivesIn.docx
Visual Basic(Vb) practical
Ec oop f90
Colegio municipal
Chapter 13
Software Development - Thinking Object's Way
Refactoring
Dotnet unit 4
Polymorphism and interface in vb.net
Ejemplo En Gamabas
ejemplos gambas
Delphi L06 GDI Drawing
C++ Windows Forms L08 - GDI P1
Comp 220 ilab 7 of 7
My favorite slides
Comp 220 ilab 7 of 7
Tooled Composite Design Pattern presentation
Tooled Composite Design Pattern
Calculadora
Calculadora

Recently uploaded (20)

PDF
cuic standard and advanced reporting.pdf
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PPTX
Cloud computing and distributed systems.
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
DOCX
The AUB Centre for AI in Media Proposal.docx
PPTX
Big Data Technologies - Introduction.pptx
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Encapsulation_ Review paper, used for researhc scholars
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
gpt5_lecture_notes_comprehensive_20250812015547.pdf
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Machine learning based COVID-19 study performance prediction
PDF
Assigned Numbers - 2025 - Bluetooth® Document
PDF
NewMind AI Weekly Chronicles - August'25-Week II
cuic standard and advanced reporting.pdf
Network Security Unit 5.pdf for BCA BBA.
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Cloud computing and distributed systems.
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Advanced methodologies resolving dimensionality complications for autism neur...
The AUB Centre for AI in Media Proposal.docx
Big Data Technologies - Introduction.pptx
Digital-Transformation-Roadmap-for-Companies.pptx
Encapsulation_ Review paper, used for researhc scholars
“AI and Expert System Decision Support & Business Intelligence Systems”
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
gpt5_lecture_notes_comprehensive_20250812015547.pdf
Diabetes mellitus diagnosis method based random forest with bat algorithm
Dropbox Q2 2025 Financial Results & Investor Presentation
The Rise and Fall of 3GPP – Time for a Sabbatical?
Machine learning based COVID-19 study performance prediction
Assigned Numbers - 2025 - Bluetooth® Document
NewMind AI Weekly Chronicles - August'25-Week II

Programasedo

  • 1. clase interfacefigura Public Interface Interfacefigura Function area() End Interface CLASE Public Class Rectangulo Implements Interfacefigura Dim base, altura As Double Public Sub New(ByVal b As Double, ByVal a As Double) base = b altura = a End Sub Public Function area() Implements Interfacefigura.area Return base * altura End Function End Class Public Class Triangulo Implements Interfacefigura
  • 2. Dim base, altura As Double Public Sub New(ByVal b As Double, ByVal a As Double) base = b altura = a End Sub Public Function area() Implements Interfacefigura.area Return (base * altura) / 2 End Function End Class Private Sub botonarea_Click(sender As Object, e As EventArgs) Handles botonarea.Click Dim rectangulo As Rectangulo Dim triangulo As Triangulo Dim base, altura As Double base = txtbase.Text altura = txtaltura.Text Triangulo = New Triangulo(base, altura) rectangulo = New Rectangulo(base, altura) txtareatriangulo.Text = triangulo.area txtarearectangulo.Text = rectangulo.area End Sub