Propriete Triangle.(JAVA)
Résolu/Fermé
lowpien
Messages postés
41
Date d'inscription
mercredi 21 mai 2008
Statut
Membre
Dernière intervention
22 janvier 2011
-
22 nov. 2008 à 20:03
lowpien Messages postés 41 Date d'inscription mercredi 21 mai 2008 Statut Membre Dernière intervention 22 janvier 2011 - 22 nov. 2008 à 22:15
lowpien Messages postés 41 Date d'inscription mercredi 21 mai 2008 Statut Membre Dernière intervention 22 janvier 2011 - 22 nov. 2008 à 22:15
A voir également:
- Propriete Triangle.(JAVA)
- Waptrick java football - Télécharger - Jeux vidéo
- Jeux java itel football - Télécharger - Jeux vidéo
- Java apk - Télécharger - Langages
- Eclipse java - Télécharger - Langages
- Java runtime environment - Télécharger - Langages
3 réponses
mype
Messages postés
2435
Date d'inscription
jeudi 1 novembre 2007
Statut
Membre
Dernière intervention
16 août 2010
436
22 nov. 2008 à 20:15
22 nov. 2008 à 20:15
quel methodes te bloque ?
mype
Messages postés
2435
Date d'inscription
jeudi 1 novembre 2007
Statut
Membre
Dernière intervention
16 août 2010
436
22 nov. 2008 à 20:46
22 nov. 2008 à 20:46
par exemple pour le premier cas de ton execution il te faut d'abord cree une methode estScalene()
public Boolean estScalene(int cote1, int cote2, int cote3) { if(cote1!=cote2 && cote1!=cote3) if(cote2!=cote3) return true; else return false; return false; }ensuite tu fais une classe qui contiendra ton main et a l'interieur tu fais
Scanner s = new Scanner(System.in); System.out.prinln("entre l'angle : "); int a=s.nextInt(); System.out.println("entre le cote 1 : "); int c1 = s.nextInt(); System.out.println("entre le cote 2 : "); int c2 = s.nextInt(); System.out.println("entre le cote 3 : "); int c3 = s.nextInt(); Triangle t1 = new Triangle(a,c1,c2,c3); if(t1.estScalene(t1.getCote1(),t1.getCote2(),t1.getCote3())) { System.out.println("t1 est scalene"); System.out.println("cote1 = "+t1.getCote1()); System.out.println("cote2 = "+t1.getCote2()); System.out.println("cote3 = "+t1.getCote3()); }apres pour les autres methodes c'est le meme principe
lowpien
Messages postés
41
Date d'inscription
mercredi 21 mai 2008
Statut
Membre
Dernière intervention
22 janvier 2011
22 nov. 2008 à 22:15
22 nov. 2008 à 22:15
merci de ton aide, a partir de la je pense pouvoir m'en sortir...
22 nov. 2008 à 20:30