Sie sind auf Seite 1von 14

KARLA LISCETH ROMERO PONCE

3roC

Pgina 1

Misin de la Facultad de Ciencias Informticas Ser una unidad con alto prestigio acadmico, con eficiencia, transparencia y calidad en la educacin, organizada en sus actividades, protagonista del progreso regional y nacional.

Visin de la Facultad de Ciencias Informticas Forma profesionales eficientes en el campo de las Ciencias Informticas, que con honestidad, equidad y solidaridad, den respuestas a las necesidades de la sociedad elevando su nivel de vida.

Misin de la Universidad Tcnica de Manab Formar acadmicos, cientficos y profesionales responsables, humanistas, ticos y solidarios, comprometidos con los objetivos del desarrollo nacional, que contribuyan a la solucin de los problemas del pas como universidad de docencia con investigacin, capaces de generar y aplicar nuevos conocimientos, fomentando la promocin y difusin de los saberes y las culturas, previstos en la Constitucin de la Repblica del Ecuador. Visin de la Universidad Tcnica de Manab Ser institucin universitaria, lder y referente de la educacin superior en el Ecuador, promoviendo la creacin, desarrollo, transmisin y difusin de la ciencia, la tcnica y la cultura, con reconocimiento social y proyeccin regional y mundial.

KARLA LISCETH ROMERO PONCE

3roC

Pgina 2

Class 1

Language that is used since basic programming electronic equipment such as calculators, microwaves, washing machines, smartphones, among others. The important thing is that the Java application that is used for any operating system is installed the JVM (Java Virtual Machine). To program in Java applications we will use the JDK (Java Development Kit) and the NetBeans IDE, the same that will be provided. Without further ado I put the course available to you waiting III programming that reflects the interest in researching and learning new things.

Class 2
KARLA LISCETH ROMERO PONCE 3roC Pgina 3

Aclass consists ofa portionof the return, andanotherfor thebodyofthe same: ClassStatement{ Class body }

Data Types. InJavathere are twomain typesofdata: 1)Simple Data Types. 2)Referencestoobjects. Thedata typesare those that canbe used directlyin a program, without the use of classes(OOP). Thesetypesare:

Declarationofvariables. The declarationofa variableis performed in thesame manner as inC.Alwayscontainsthe name(identifier variable)andthe data typeto which it belongs. Thescope of the variabledepends on the locationin the programwhere it isdeclared. Example: int x;

KARLA LISCETH ROMERO PONCE

3roC

Pgina 4

Class 3

if.Themostcommonly usedstatementis the if statementwhose syntaxis: if (condicion /es) { instruccion/es por verdadero; } else { instruccion/es por falso; } You can nesttheifas you wish...alwaysmaintaining levelsofthecode blocks.

switch.Anotherstatementis theswitchto usethe following syntax: switch(variable a evaluar){ case opcion: instruccion/es; break; // el break se utiliza para saltar case opcion n: instruccion/es; break; // el break se utiliza para saltar default : //se utiliza si no se cumplen los cases anteriores instruccion/es; }

KARLA LISCETH ROMERO PONCE

3roC

Pgina 5

Class 4

LOOP. Used when you know the number of times you are going to execute the cycle, its syntax is for (declaration / initialization, condition, counter) { instruction / s; } e.g. for (int i = 0; i <10; i + +) { System.out.println (i); }

DO-WHILE LOOP Used when no one knows the number of repeat cycles but is expected to DO IT AT LEAST ONCE, the syntax is: do { instruction / s; } while (condition); e.g. int i = 0; do { i + +; System.out.println (i); } while (i <10);

KARLA LISCETH ROMERO PONCE

3roC

Pgina 6

WHILE LOOP Used when no one knows the number of repeat cycles IS EXPECTED evaluate expression if true to run your code, the syntax is: while (condition) { instruction / s; } e.g. int i = 0; while (i <10) { i + +; System.out.println (i); }

In both structures HOW MUCH DO-WHILE WHILE YOU MUST BE VERY CAREFUL TO LOCATE A MECHANISM TO LEAVE sometime Repetition Structure, in our example we increase the variable i in each cycle of execution, if it were not the cycle would be endless.

KARLA LISCETH ROMERO PONCE

3roC

Pgina 7

Class 5

Vectorsprovide the functionality ofa single variablegrouped intodifferent values ofthe same type,that is,assigning alarge memoryspaceto store the itemsofa single type ofdata at a time, his statementis based on: typevector []= newtype[size]; Basicallyis thedeclarationand initialization, remember to userepetition structurestotraversethevectorcontaining theelementsfor anytype of operation, such asreading,assignment, orsampledata. Matricesasvectors areallocated memoryspacesidentified by avariable inwhich casethe optioncoverstworows, the first forthe rows andthe secondfor columns. The statement will bemaintained withthe following exception: typename[] [] = newtype[size row] [column size]

KARLA LISCETH ROMERO PONCE

3roC

Pgina 8

Class 6

One method is: A blockof code thathas a name, receives someparameters orarguments(optionally) contains statementsorinstructions to makesomething (optionally) and returns a valueof anyknowntype(optionally). Theoverallsyntaxis: ambito_Tipo_Valor_devueltonombre_mtodo(lista_argumentos) { bloque_de_codigo;} And the listof argumentsis expressedby statingthe type and nameofthe same(as invariable declarations). If more thanoneare separatedby commas.For example: intsumaEnteros(inta,intb) { intc= a+b; returnc; }

KARLA LISCETH ROMERO PONCE

3roC

Pgina 9

Class7

Theidea of inheritanceis to allowthe creationof new classesbased on existing classes. When youinherit froman existing class, we reuse(or inherit) methodsand fields andadd newfields and methodsto meetthenewsituation. Every timewe findthe relation"is-a" between twoclasses, we arein the presenceof inheritance. Theexisting classiscalled Thenewclassiscalledsubclass, thesuperclassorbase class, derived class, orparent orchild class. class.

Throughinheritancewe canadd new fields, and we can addorsetmethods(override). Onmounting amethod isredefiningtheinheritedcase.

KARLA LISCETH ROMERO PONCE

3roC

Pgina 10

Class 8

Polymorphism isa concept ofobject-oriented programmingthatallows us to programin general, rather thanspecifically. Overall weused to programobjectswith common characteristicsand that all theseshare the samesuperclassina class hierarchy, asif they were allobjectsofthe superclass. Thissimplifies programmingus.

KARLA LISCETH ROMERO PONCE

3roC

Pgina 11

Class 9

An abstract class is a class that has at least one method that has not been specified. This prevents it instantiate. abstract class Example { abstract myMethod (); }

Class 10

KARLA LISCETH ROMERO PONCE

3roC

Pgina 12

To create an interface, use the interface keyword instead of class. The interface can be defined public or no access modifier, and has the same meaning as for classes. All methods that declares an interface are always public. To indicate that a class implements an interface method uses the implements keyword. The compiler will verify that the class actually declare and implement all methods of the interface. A class can implement more than one interface. Declaration and use An interface is declared: nombre_interface interface { tipo_retorno nombre_metodo (lista_argumentos); ... } For example: InstrumentoMusical interface { void play (); void tune (); String tipoInstrumento (); } And a class that implements the interface: InstrumentoViento class extends Object implements InstrumentoMusical { void play () {. . . }; void tune () {. . .}; TipoInstrumento String () {} } Guitar class extends {InstrumentoViento TipoInstrumento String () { return "Guitar"; } }

KARLA LISCETH ROMERO PONCE

3roC

Pgina 13

The class implements the interface InstrumentoViento stating the methods and writing the code. A derived class can also redefine if required any of the methods of the interface.

KARLA LISCETH ROMERO PONCE

3roC

Pgina 14

Das könnte Ihnen auch gefallen