This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Clase Padre (Superclase) | |
| class Floreria { | |
| String nombre; | |
| String direccion; | |
| int cantidadFlores; | |
| Floreria(this.nombre, this.direccion, this.cantidadFlores); | |
| void mostrarDatos() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| void main() { | |
| print ("Mostrando datos desde funcion"); | |
| misdatos(); | |
| int val1 = 20; | |
| int val2 = 10; | |
| // --- Llamadas a Funciones Tradicionales --- | |
| print('--- Funciones Tradicionales ---'); | |
| int resSumaTrad = sumarTradicional(val1, val2); | |
| int resRestaTrad = restarTradicional(val1, val2); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| void misDatos({ required String nombre, required int edad, required String gpo, | |
| String milenguajeprogramacion = "Dart", }) { | |
| //instrucciones dentro de la funcion | |
| print("Mi nombre es: $nombre"); | |
| print("Mi edad es: $edad"); | |
| print("Mi grupo es: $gpo"); | |
| print("Estoy programando en: $milenguajeprogramacion"); | |
| } //fin de funion mis datos | |
| void main() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| void misdatos() { | |
| String nombre= "Kevin Cardiel"; | |
| int edad=17; | |
| String gpo= "6 I"; | |
| String milenguajeprogramacion= "DART"; | |
| print("Mi nombre es: $nombre "); | |
| print("Mi edad es: $edad "); | |
| print("Mi grupo es: $gpo "); | |
| print("Estoy progamando en: $milenguajeprogramacion "); | |
| }//fin funcion . misDatos() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| void main() { | |
| int edad = 17; | |
| double estatura = 1.74; | |
| String nombre="Kevin Cardiel"; | |
| bool asistio = false; | |
| String gpo= 'el'; | |
| print("Desarrolador Kevin Cardiel"); | |
| print("-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*"); | |
| print("Mostrar Datos"); | |
| print("Nombre : $nombre"); |