97
Programmation Orienté Objet Application Au Langage JAVA Licence professionnelle ATC ~ 07/08 Bessem BOURAOUI [email protected] strasbg.fr

Programmation Orienté Objet Application Au Langage JAVA Licence professionnelle ATC ~ 07/08 Bessem BOURAOUI [email protected]

Embed Size (px)

Citation preview

Page 1: Programmation Orienté Objet Application Au Langage JAVA Licence professionnelle ATC ~ 07/08 Bessem BOURAOUI bouraoui@dpt-info.u-strasbg.fr

Programmation Orienté Objet

Application Au Langage JAVA

Licence professionnelle ATC ~ 07/08

Bessem BOURAOUI

[email protected]

Page 2: Programmation Orienté Objet Application Au Langage JAVA Licence professionnelle ATC ~ 07/08 Bessem BOURAOUI bouraoui@dpt-info.u-strasbg.fr

Histoire

Page 3: Programmation Orienté Objet Application Au Langage JAVA Licence professionnelle ATC ~ 07/08 Bessem BOURAOUI bouraoui@dpt-info.u-strasbg.fr

POO~Histoire Début : Norvège années 60.

Programmation des simulations par événements discrets.Années 70 :

développement par Xérox du premier systéme Fenêtres Icônes et

souris. Développement par Apple des premiers Mac.

Années 80: Développement des ordinateurs personels. Intérêt pour les interfaces graphiques. Apparition du Eiffel, C++ et Object Pascal.

Années 90 : Maturité des langages Orientés Objet. Standardisation du C++ Apparition du JAVA ou du Python.

Page 4: Programmation Orienté Objet Application Au Langage JAVA Licence professionnelle ATC ~ 07/08 Bessem BOURAOUI bouraoui@dpt-info.u-strasbg.fr

JAVA~Histoire

Dates importantes : 1993 : projet Oak (langage pour l'électronique grand public) 1995 : Java / HotJava à WWW3 Mai 95 : Netscape prend la licence Sept. 95 : JDK 1.0 b1 ( J ava D eveloppement Kit ) Déc. 95 : Microsoft se dit intéressé Janv. 96 : JDK 1.0.1 Eté 96 : Java Study Group ISO/IEC JTC 1/SC22 Fin 96 : RMI, JDBC, JavaBeans Fév. 97 : JDK 1.1

Page 5: Programmation Orienté Objet Application Au Langage JAVA Licence professionnelle ATC ~ 07/08 Bessem BOURAOUI bouraoui@dpt-info.u-strasbg.fr

Pourquoi JAVA?

Page 6: Programmation Orienté Objet Application Au Langage JAVA Licence professionnelle ATC ~ 07/08 Bessem BOURAOUI bouraoui@dpt-info.u-strasbg.fr

Pourquoi JAVA?

Le langage Java est un langage capable de s'exécuter sur n'importe quelle plate-forme car c'est d'une part un langage compilé et d'autre part un langage interprété.

Le code source Java est transformé en de simples instructions binaires.

(Byte Code= Instructions générées par le compilateur qu'un ordinateur abstrait peut exécuter).

Page 7: Programmation Orienté Objet Application Au Langage JAVA Licence professionnelle ATC ~ 07/08 Bessem BOURAOUI bouraoui@dpt-info.u-strasbg.fr

Pourquoi JAVA?

Robuste et sûr :

Peu de pièges. Pas de pointeurs, pas de fonctions d'arguments variables. Compilateurs très stricts car toutes les valeurs doivent être initialisées. Le traitement des exceptions est obligatoire. Les erreurs à l'exécution sont vérifiées tout comme les limites des tableaux.

Page 8: Programmation Orienté Objet Application Au Langage JAVA Licence professionnelle ATC ~ 07/08 Bessem BOURAOUI bouraoui@dpt-info.u-strasbg.fr

Pourquoi JAVA?

Sécurisé :

Allocation de la mémoire dynamique due au GARBAGE COLLECTOR (Ramasse Miettes).

Page 9: Programmation Orienté Objet Application Au Langage JAVA Licence professionnelle ATC ~ 07/08 Bessem BOURAOUI bouraoui@dpt-info.u-strasbg.fr

Pourquoi JAVA?Simple : Le code source en JAVA est simple. Il n'y a plus de préprocesseur, plus de #define, de typedef, plus de recours aux fichiers headers, car JAVA permet la définition d'autres classes et de leurs méthodes. De plus, les pointeurs, l'héritage multiple, la surcharge d'opérateurs, la libération de mémoire transparente pour l'utilisateur et une meilleure gestion des erreurs sont autant de points complexes du C qui sont soit inexistants soit traités implicitement en JAVA. Les chaînes et les tableaux sont désormais des objets faisant partie intégrante du langage.

Page 10: Programmation Orienté Objet Application Au Langage JAVA Licence professionnelle ATC ~ 07/08 Bessem BOURAOUI bouraoui@dpt-info.u-strasbg.fr

Pourquoi JAVA?Portable : Le compilateur Java génère du byte-code .(Le byte-code constitue les instructions pour la machine virtuelle JVM) La Java Virtual Machine existe par défaut sur de nombreuses plateformes (Unix, Win32, Mac, OS/2, Netscape, IE...) peut être aisément installée. Le langage a une sémantique très précise. La taille des types primitifs est indépendante de la plate-forme. Java supporte un code source écrit en Unicode. (Code Universel) Java est accompagné d'une librairie standard.

Page 11: Programmation Orienté Objet Application Au Langage JAVA Licence professionnelle ATC ~ 07/08 Bessem BOURAOUI bouraoui@dpt-info.u-strasbg.fr

Planning du cour

Introduction au JAVA.

Héritage exception Entrées/sorties.

Applets Listener Thread.

Page 12: Programmation Orienté Objet Application Au Langage JAVA Licence professionnelle ATC ~ 07/08 Bessem BOURAOUI bouraoui@dpt-info.u-strasbg.fr

Cours « 1 » : Introduction au Java

Page 13: Programmation Orienté Objet Application Au Langage JAVA Licence professionnelle ATC ~ 07/08 Bessem BOURAOUI bouraoui@dpt-info.u-strasbg.fr

Principe POO

Cours « 1 » : Introduction au Java

Page 14: Programmation Orienté Objet Application Au Langage JAVA Licence professionnelle ATC ~ 07/08 Bessem BOURAOUI bouraoui@dpt-info.u-strasbg.fr

Principe POO

Cours « 1 » : Introduction au Java

Page 15: Programmation Orienté Objet Application Au Langage JAVA Licence professionnelle ATC ~ 07/08 Bessem BOURAOUI bouraoui@dpt-info.u-strasbg.fr

Principe POO

Cours « 1 » : Introduction au Java

Page 16: Programmation Orienté Objet Application Au Langage JAVA Licence professionnelle ATC ~ 07/08 Bessem BOURAOUI bouraoui@dpt-info.u-strasbg.fr

Principe de fonctionnement

Cours « 1 » : Introduction au Java

Page 17: Programmation Orienté Objet Application Au Langage JAVA Licence professionnelle ATC ~ 07/08 Bessem BOURAOUI bouraoui@dpt-info.u-strasbg.fr

Machines virtuelles Java

Cours « 1 » : Introduction au Java

Page 18: Programmation Orienté Objet Application Au Langage JAVA Licence professionnelle ATC ~ 07/08 Bessem BOURAOUI bouraoui@dpt-info.u-strasbg.fr

Etape de développement

Cours « 1 » : Introduction au Java

Page 19: Programmation Orienté Objet Application Au Langage JAVA Licence professionnelle ATC ~ 07/08 Bessem BOURAOUI bouraoui@dpt-info.u-strasbg.fr

Java et ses versions

Cours « 1 » : Introduction au Java

Page 20: Programmation Orienté Objet Application Au Langage JAVA Licence professionnelle ATC ~ 07/08 Bessem BOURAOUI bouraoui@dpt-info.u-strasbg.fr

Les outils Java

Cours « 1 » : Introduction au Java

Page 21: Programmation Orienté Objet Application Au Langage JAVA Licence professionnelle ATC ~ 07/08 Bessem BOURAOUI bouraoui@dpt-info.u-strasbg.fr

API Java

Cours « 1 » : Introduction au Java

Page 22: Programmation Orienté Objet Application Au Langage JAVA Licence professionnelle ATC ~ 07/08 Bessem BOURAOUI bouraoui@dpt-info.u-strasbg.fr

Premier programme en Java

Cours « 1 » : Introduction au Java

Page 23: Programmation Orienté Objet Application Au Langage JAVA Licence professionnelle ATC ~ 07/08 Bessem BOURAOUI bouraoui@dpt-info.u-strasbg.fr

Mise en œuvre

Cours « 1 » : Introduction au Java

Page 24: Programmation Orienté Objet Application Au Langage JAVA Licence professionnelle ATC ~ 07/08 Bessem BOURAOUI bouraoui@dpt-info.u-strasbg.fr

Types Primitifs de Java

Cours « 1 » : Introduction au Java

Page 25: Programmation Orienté Objet Application Au Langage JAVA Licence professionnelle ATC ~ 07/08 Bessem BOURAOUI bouraoui@dpt-info.u-strasbg.fr

Initialisation

Cours « 1 » : Introduction au Java

Page 26: Programmation Orienté Objet Application Au Langage JAVA Licence professionnelle ATC ~ 07/08 Bessem BOURAOUI bouraoui@dpt-info.u-strasbg.fr

Conversions de types

Cours « 1 » : Introduction au Java

Page 27: Programmation Orienté Objet Application Au Langage JAVA Licence professionnelle ATC ~ 07/08 Bessem BOURAOUI bouraoui@dpt-info.u-strasbg.fr

Conversions de types

Cours « 1 » : Introduction au Java

Page 28: Programmation Orienté Objet Application Au Langage JAVA Licence professionnelle ATC ~ 07/08 Bessem BOURAOUI bouraoui@dpt-info.u-strasbg.fr

Opérateurs

Cours « 1 » : Introduction au Java

Page 29: Programmation Orienté Objet Application Au Langage JAVA Licence professionnelle ATC ~ 07/08 Bessem BOURAOUI bouraoui@dpt-info.u-strasbg.fr

Opérateurs

Cours « 1 » : Introduction au Java

Page 30: Programmation Orienté Objet Application Au Langage JAVA Licence professionnelle ATC ~ 07/08 Bessem BOURAOUI bouraoui@dpt-info.u-strasbg.fr

Structure de contrôle

Cours « 1 » : Introduction au Java

Page 31: Programmation Orienté Objet Application Au Langage JAVA Licence professionnelle ATC ~ 07/08 Bessem BOURAOUI bouraoui@dpt-info.u-strasbg.fr

Structure de contrôle

Cours « 1 » : Introduction au Java

Page 32: Programmation Orienté Objet Application Au Langage JAVA Licence professionnelle ATC ~ 07/08 Bessem BOURAOUI bouraoui@dpt-info.u-strasbg.fr

Structure de contrôle

Cours « 1 » : Introduction au Java

Page 33: Programmation Orienté Objet Application Au Langage JAVA Licence professionnelle ATC ~ 07/08 Bessem BOURAOUI bouraoui@dpt-info.u-strasbg.fr

Structure de contrôle

Cours « 1 » : Introduction au Java

Page 34: Programmation Orienté Objet Application Au Langage JAVA Licence professionnelle ATC ~ 07/08 Bessem BOURAOUI bouraoui@dpt-info.u-strasbg.fr

Structure de contrôle

Cours « 1 » : Introduction au Java

Page 35: Programmation Orienté Objet Application Au Langage JAVA Licence professionnelle ATC ~ 07/08 Bessem BOURAOUI bouraoui@dpt-info.u-strasbg.fr

Structure de contrôle

Cours « 1 » : Introduction au Java

Page 36: Programmation Orienté Objet Application Au Langage JAVA Licence professionnelle ATC ~ 07/08 Bessem BOURAOUI bouraoui@dpt-info.u-strasbg.fr

Opérateurs sur les types primitifs

Cours « 1 » : Introduction au Java

Page 37: Programmation Orienté Objet Application Au Langage JAVA Licence professionnelle ATC ~ 07/08 Bessem BOURAOUI bouraoui@dpt-info.u-strasbg.fr

Opérateurs sur les types primitifs

Cours « 1 » : Introduction au Java

Page 38: Programmation Orienté Objet Application Au Langage JAVA Licence professionnelle ATC ~ 07/08 Bessem BOURAOUI bouraoui@dpt-info.u-strasbg.fr

Affectation, recopie et comparaison

Cours « 1 » : Introduction au Java

Page 39: Programmation Orienté Objet Application Au Langage JAVA Licence professionnelle ATC ~ 07/08 Bessem BOURAOUI bouraoui@dpt-info.u-strasbg.fr

Procédures

Cours « 1 » : Introduction au Java

Page 40: Programmation Orienté Objet Application Au Langage JAVA Licence professionnelle ATC ~ 07/08 Bessem BOURAOUI bouraoui@dpt-info.u-strasbg.fr

Procédures

Cours « 1 » : Introduction au Java

Page 41: Programmation Orienté Objet Application Au Langage JAVA Licence professionnelle ATC ~ 07/08 Bessem BOURAOUI bouraoui@dpt-info.u-strasbg.fr

Procédures

Cours « 1 » : Introduction au Java

Page 42: Programmation Orienté Objet Application Au Langage JAVA Licence professionnelle ATC ~ 07/08 Bessem BOURAOUI bouraoui@dpt-info.u-strasbg.fr

Fonctions

Cours « 1 » : Introduction au Java

Page 43: Programmation Orienté Objet Application Au Langage JAVA Licence professionnelle ATC ~ 07/08 Bessem BOURAOUI bouraoui@dpt-info.u-strasbg.fr

Fonctions

Cours « 1 » : Introduction au Java

Page 44: Programmation Orienté Objet Application Au Langage JAVA Licence professionnelle ATC ~ 07/08 Bessem BOURAOUI bouraoui@dpt-info.u-strasbg.fr

Structures d’un programme en Java

Cours « 1 » : Introduction au Java

Page 45: Programmation Orienté Objet Application Au Langage JAVA Licence professionnelle ATC ~ 07/08 Bessem BOURAOUI bouraoui@dpt-info.u-strasbg.fr

Structures d’un programme en Java

Cours « 1 » : Introduction au Java

Page 46: Programmation Orienté Objet Application Au Langage JAVA Licence professionnelle ATC ~ 07/08 Bessem BOURAOUI bouraoui@dpt-info.u-strasbg.fr

Structures d’un programme en Java

Cours « 1 » : Introduction au Java

Page 47: Programmation Orienté Objet Application Au Langage JAVA Licence professionnelle ATC ~ 07/08 Bessem BOURAOUI bouraoui@dpt-info.u-strasbg.fr

Mots réservés

Cours « 1 » : Introduction au Java

Page 48: Programmation Orienté Objet Application Au Langage JAVA Licence professionnelle ATC ~ 07/08 Bessem BOURAOUI bouraoui@dpt-info.u-strasbg.fr

Les tableaux en Java

Cours « 1 » : Introduction au Java

Page 49: Programmation Orienté Objet Application Au Langage JAVA Licence professionnelle ATC ~ 07/08 Bessem BOURAOUI bouraoui@dpt-info.u-strasbg.fr

Tableaux : Déclaration

Cours « 1 » : Introduction au Java

Page 50: Programmation Orienté Objet Application Au Langage JAVA Licence professionnelle ATC ~ 07/08 Bessem BOURAOUI bouraoui@dpt-info.u-strasbg.fr

Tableaux : Dimensionnement

Cours « 1 » : Introduction au Java

Page 51: Programmation Orienté Objet Application Au Langage JAVA Licence professionnelle ATC ~ 07/08 Bessem BOURAOUI bouraoui@dpt-info.u-strasbg.fr

Tableaux : Initialisation

Cours « 1 » : Introduction au Java

Page 52: Programmation Orienté Objet Application Au Langage JAVA Licence professionnelle ATC ~ 07/08 Bessem BOURAOUI bouraoui@dpt-info.u-strasbg.fr

Tableaux en Java : Synthèse

Cours « 1 » : Introduction au Java

Page 53: Programmation Orienté Objet Application Au Langage JAVA Licence professionnelle ATC ~ 07/08 Bessem BOURAOUI bouraoui@dpt-info.u-strasbg.fr

Tableaux multidimensionnel

Cours « 1 » : Introduction au Java

Page 54: Programmation Orienté Objet Application Au Langage JAVA Licence professionnelle ATC ~ 07/08 Bessem BOURAOUI bouraoui@dpt-info.u-strasbg.fr

Précision sur « system.out. »

Cours « 1 » : Introduction au Java

Page 55: Programmation Orienté Objet Application Au Langage JAVA Licence professionnelle ATC ~ 07/08 Bessem BOURAOUI bouraoui@dpt-info.u-strasbg.fr

Mise en forme

Cours « 1 » : Introduction au Java

Page 56: Programmation Orienté Objet Application Au Langage JAVA Licence professionnelle ATC ~ 07/08 Bessem BOURAOUI bouraoui@dpt-info.u-strasbg.fr

Classe : Définition

Cours « 1 » : Introduction au Java

Page 57: Programmation Orienté Objet Application Au Langage JAVA Licence professionnelle ATC ~ 07/08 Bessem BOURAOUI bouraoui@dpt-info.u-strasbg.fr

Classe : Notations

Cours « 1 » : Introduction au Java

Page 58: Programmation Orienté Objet Application Au Langage JAVA Licence professionnelle ATC ~ 07/08 Bessem BOURAOUI bouraoui@dpt-info.u-strasbg.fr

Codage de la classe « voiture »

Cours « 1 » : Introduction au Java

Page 59: Programmation Orienté Objet Application Au Langage JAVA Licence professionnelle ATC ~ 07/08 Bessem BOURAOUI bouraoui@dpt-info.u-strasbg.fr

Classe : Attributs

Cours « 1 » : Introduction au Java

Page 60: Programmation Orienté Objet Application Au Langage JAVA Licence professionnelle ATC ~ 07/08 Bessem BOURAOUI bouraoui@dpt-info.u-strasbg.fr

Classe : Attributs et variables

Cours « 1 » : Introduction au Java

Page 61: Programmation Orienté Objet Application Au Langage JAVA Licence professionnelle ATC ~ 07/08 Bessem BOURAOUI bouraoui@dpt-info.u-strasbg.fr

Conventions en Java

Cours « 1 » : Introduction au Java

Page 62: Programmation Orienté Objet Application Au Langage JAVA Licence professionnelle ATC ~ 07/08 Bessem BOURAOUI bouraoui@dpt-info.u-strasbg.fr

Objet : Définition

Cours « 1 » : Introduction au Java

Page 63: Programmation Orienté Objet Application Au Langage JAVA Licence professionnelle ATC ~ 07/08 Bessem BOURAOUI bouraoui@dpt-info.u-strasbg.fr

Objet : Notations

Cours « 1 » : Introduction au Java

Page 64: Programmation Orienté Objet Application Au Langage JAVA Licence professionnelle ATC ~ 07/08 Bessem BOURAOUI bouraoui@dpt-info.u-strasbg.fr

Etats des objets

Cours « 1 » : Introduction au Java

Page 65: Programmation Orienté Objet Application Au Langage JAVA Licence professionnelle ATC ~ 07/08 Bessem BOURAOUI bouraoui@dpt-info.u-strasbg.fr

Affectation et comparaison

Cours « 1 » : Introduction au Java

Page 66: Programmation Orienté Objet Application Au Langage JAVA Licence professionnelle ATC ~ 07/08 Bessem BOURAOUI bouraoui@dpt-info.u-strasbg.fr

Affectation et comparaison

Cours « 1 » : Introduction au Java

Page 67: Programmation Orienté Objet Application Au Langage JAVA Licence professionnelle ATC ~ 07/08 Bessem BOURAOUI bouraoui@dpt-info.u-strasbg.fr

Structure des objets

Cours « 1 » : Introduction au Java

Page 68: Programmation Orienté Objet Application Au Langage JAVA Licence professionnelle ATC ~ 07/08 Bessem BOURAOUI bouraoui@dpt-info.u-strasbg.fr

Cycle de vie d’un objet

Cours « 1 » : Introduction au Java

Page 69: Programmation Orienté Objet Application Au Langage JAVA Licence professionnelle ATC ~ 07/08 Bessem BOURAOUI bouraoui@dpt-info.u-strasbg.fr

Création d’objet

Cours « 1 » : Introduction au Java

Page 70: Programmation Orienté Objet Application Au Langage JAVA Licence professionnelle ATC ~ 07/08 Bessem BOURAOUI bouraoui@dpt-info.u-strasbg.fr

Création d’objet

Cours « 1 » : Introduction au Java

Page 71: Programmation Orienté Objet Application Au Langage JAVA Licence professionnelle ATC ~ 07/08 Bessem BOURAOUI bouraoui@dpt-info.u-strasbg.fr

Création d’objet

Cours « 1 » : Introduction au Java

Page 72: Programmation Orienté Objet Application Au Langage JAVA Licence professionnelle ATC ~ 07/08 Bessem BOURAOUI bouraoui@dpt-info.u-strasbg.fr

Constructeur de « Voiture »

Cours « 1 » : Introduction au Java

Page 73: Programmation Orienté Objet Application Au Langage JAVA Licence professionnelle ATC ~ 07/08 Bessem BOURAOUI bouraoui@dpt-info.u-strasbg.fr

Constructeur de « Voiture »

Cours « 1 » : Introduction au Java

Page 74: Programmation Orienté Objet Application Au Langage JAVA Licence professionnelle ATC ~ 07/08 Bessem BOURAOUI bouraoui@dpt-info.u-strasbg.fr

Construire une voiture de 7CV

Cours « 1 » : Introduction au Java

Page 75: Programmation Orienté Objet Application Au Langage JAVA Licence professionnelle ATC ~ 07/08 Bessem BOURAOUI bouraoui@dpt-info.u-strasbg.fr

Constructeur sans argument

Cours « 1 » : Introduction au Java

Page 76: Programmation Orienté Objet Application Au Langage JAVA Licence professionnelle ATC ~ 07/08 Bessem BOURAOUI bouraoui@dpt-info.u-strasbg.fr

Accès au attributs

Cours « 1 » : Introduction au Java

Page 77: Programmation Orienté Objet Application Au Langage JAVA Licence professionnelle ATC ~ 07/08 Bessem BOURAOUI bouraoui@dpt-info.u-strasbg.fr

Appel de méthodes

Cours « 1 » : Introduction au Java

Page 78: Programmation Orienté Objet Application Au Langage JAVA Licence professionnelle ATC ~ 07/08 Bessem BOURAOUI bouraoui@dpt-info.u-strasbg.fr

Appel de méthodes

Cours « 1 » : Introduction au Java

Page 79: Programmation Orienté Objet Application Au Langage JAVA Licence professionnelle ATC ~ 07/08 Bessem BOURAOUI bouraoui@dpt-info.u-strasbg.fr

Passage des paramètres

Cours « 1 » : Introduction au Java

Page 80: Programmation Orienté Objet Application Au Langage JAVA Licence professionnelle ATC ~ 07/08 Bessem BOURAOUI bouraoui@dpt-info.u-strasbg.fr

Passage des paramètres

Cours « 1 » : Introduction au Java

Page 81: Programmation Orienté Objet Application Au Langage JAVA Licence professionnelle ATC ~ 07/08 Bessem BOURAOUI bouraoui@dpt-info.u-strasbg.fr

Objet « courant »

Cours « 1 » : Introduction au Java

Page 82: Programmation Orienté Objet Application Au Langage JAVA Licence professionnelle ATC ~ 07/08 Bessem BOURAOUI bouraoui@dpt-info.u-strasbg.fr

Objet « courant » : Méthodes

Cours « 1 » : Introduction au Java

Page 83: Programmation Orienté Objet Application Au Langage JAVA Licence professionnelle ATC ~ 07/08 Bessem BOURAOUI bouraoui@dpt-info.u-strasbg.fr

Gestion des objets

Cours « 1 » : Introduction au Java

Page 84: Programmation Orienté Objet Application Au Langage JAVA Licence professionnelle ATC ~ 07/08 Bessem BOURAOUI bouraoui@dpt-info.u-strasbg.fr

Encapsulation

Cours « 1 » : Introduction au Java

Page 85: Programmation Orienté Objet Application Au Langage JAVA Licence professionnelle ATC ~ 07/08 Bessem BOURAOUI bouraoui@dpt-info.u-strasbg.fr

Encapsulation

Cours « 1 » : Introduction au Java

Page 86: Programmation Orienté Objet Application Au Langage JAVA Licence professionnelle ATC ~ 07/08 Bessem BOURAOUI bouraoui@dpt-info.u-strasbg.fr

Encapsulation

Cours « 1 » : Introduction au Java

Page 87: Programmation Orienté Objet Application Au Langage JAVA Licence professionnelle ATC ~ 07/08 Bessem BOURAOUI bouraoui@dpt-info.u-strasbg.fr

Encapsulation

Cours « 1 » : Introduction au Java

Page 88: Programmation Orienté Objet Application Au Langage JAVA Licence professionnelle ATC ~ 07/08 Bessem BOURAOUI bouraoui@dpt-info.u-strasbg.fr

Chaînes des caractères « String »

Cours « 1 » : Introduction au Java

Page 89: Programmation Orienté Objet Application Au Langage JAVA Licence professionnelle ATC ~ 07/08 Bessem BOURAOUI bouraoui@dpt-info.u-strasbg.fr

Opérations de bases sur « String »

Cours « 1 » : Introduction au Java

Page 90: Programmation Orienté Objet Application Au Langage JAVA Licence professionnelle ATC ~ 07/08 Bessem BOURAOUI bouraoui@dpt-info.u-strasbg.fr

Variables de classe

Cours « 1 » : Introduction au Java

Page 91: Programmation Orienté Objet Application Au Langage JAVA Licence professionnelle ATC ~ 07/08 Bessem BOURAOUI bouraoui@dpt-info.u-strasbg.fr

Variables de classe

Cours « 1 » : Introduction au Java

Page 92: Programmation Orienté Objet Application Au Langage JAVA Licence professionnelle ATC ~ 07/08 Bessem BOURAOUI bouraoui@dpt-info.u-strasbg.fr

Constantes de classe

Cours « 1 » : Introduction au Java

Page 93: Programmation Orienté Objet Application Au Langage JAVA Licence professionnelle ATC ~ 07/08 Bessem BOURAOUI bouraoui@dpt-info.u-strasbg.fr

Variable et constantes de classe

Cours « 1 » : Introduction au Java

Page 94: Programmation Orienté Objet Application Au Langage JAVA Licence professionnelle ATC ~ 07/08 Bessem BOURAOUI bouraoui@dpt-info.u-strasbg.fr

Méthode de classe

Cours « 1 » : Introduction au Java

Page 95: Programmation Orienté Objet Application Au Langage JAVA Licence professionnelle ATC ~ 07/08 Bessem BOURAOUI bouraoui@dpt-info.u-strasbg.fr

Méthode de classe

Cours « 1 » : Introduction au Java

Page 96: Programmation Orienté Objet Application Au Langage JAVA Licence professionnelle ATC ~ 07/08 Bessem BOURAOUI bouraoui@dpt-info.u-strasbg.fr

Méthode de classe : erreur classique

Cours « 1 » : Introduction au Java

Page 97: Programmation Orienté Objet Application Au Langage JAVA Licence professionnelle ATC ~ 07/08 Bessem BOURAOUI bouraoui@dpt-info.u-strasbg.fr

Travail demandé

Télécharger la version 5 de Java, vous la trouver gratuitement sur Internet

jdk-1_5_0_08-windows-i586-p.exe Modifier les variables d’environnement de

Windows, dans le classpath vous devez ajouter

C:\jdk1.5.0_08\lib;C:\jdk1.5.0_08\bin Installer Eclipse

Cours « 1 » : Introduction au Java