السلام عليكم يا زوارنا الكرام يمكنكم التسجيل بهذا النتدى و المساهمة في تطويره
إنشاء الله
وشكرا
السلام عليكم يا زوارنا الكرام يمكنكم التسجيل بهذا النتدى و المساهمة في تطويره
إنشاء الله
وشكرا
هل تريد التفاعل مع هذه المساهمة؟ كل ما عليك هو إنشاء حساب جديد ببضع خطوات أو تسجيل الدخول للمتابعة.



 
بوابة مادنيس-ماالرئيسيةأحدث الصورالتسجيلدخول

Techniques de Développement Informatique
Développement Informatique

تخفيض ترتيب موقعك في أليكسا


 

 [تم الحل]partie theorie poo 2010 : question

اذهب الى الأسفل 
5 مشترك
كاتب الموضوعرسالة
fakhita

fakhita


عدد الرسائل : 35
العمر : 33
تاريخ التسجيل : 06/01/2011

[تم الحل]partie theorie poo 2010 : question Empty
مُساهمةموضوع: [تم الحل]partie theorie poo 2010 : question   [تم الحل]partie theorie poo 2010 : question I_icon_minitimeالخميس 30 يونيو - 17:30:23

! stpp
jai p bien compris comment corriger cette partie , si klk peut m'aider
[/left]
الرجوع الى أعلى الصفحة اذهب الى الأسفل
yooussef

yooussef


عدد الرسائل : 34
العمر : 34
تاريخ التسجيل : 04/04/2011

[تم الحل]partie theorie poo 2010 : question Empty
مُساهمةموضوع: رد: [تم الحل]partie theorie poo 2010 : question   [تم الحل]partie theorie poo 2010 : question I_icon_minitimeالجمعة 1 يوليو - 3:34:46

[ندعوك للتسجيل في المنتدى أو التعريف بنفسك لمعاينة هذا الرابط]
الرجوع الى أعلى الصفحة اذهب الى الأسفل
fakhita

fakhita


عدد الرسائل : 35
العمر : 33
تاريخ التسجيل : 06/01/2011

[تم الحل]partie theorie poo 2010 : question Empty
مُساهمةموضوع: رد: [تم الحل]partie theorie poo 2010 : question   [تم الحل]partie theorie poo 2010 : question I_icon_minitimeالجمعة 1 يوليو - 4:09:13

merciiiiiiii

bounce
الرجوع الى أعلى الصفحة اذهب الى الأسفل
ach1991raf

ach1991raf


عدد الرسائل : 62
العمر : 33
تاريخ التسجيل : 05/06/2011

[تم الحل]partie theorie poo 2010 : question Empty
مُساهمةموضوع: رد: [تم الحل]partie theorie poo 2010 : question   [تم الحل]partie theorie poo 2010 : question I_icon_minitimeالجمعة 1 يوليو - 13:21:46

mercii Smile
الرجوع الى أعلى الصفحة اذهب الى الأسفل
bella med

bella med


عدد الرسائل : 66
العمر : 34
تاريخ التسجيل : 24/05/2011

[تم الحل]partie theorie poo 2010 : question Empty
مُساهمةموضوع: رد: [تم الحل]partie theorie poo 2010 : question   [تم الحل]partie theorie poo 2010 : question I_icon_minitimeالجمعة 1 يوليو - 15:33:01

walakin smholiya homa matlboch Longeur 3lach daroha ftshih
الرجوع الى أعلى الصفحة اذهب الى الأسفل
vb-gang

vb-gang


عدد الرسائل : 38
العمر : 31
تاريخ التسجيل : 11/04/2011

[تم الحل]partie theorie poo 2010 : question Empty
مُساهمةموضوع: رد: [تم الحل]partie theorie poo 2010 : question   [تم الحل]partie theorie poo 2010 : question I_icon_minitimeالجمعة 1 يوليو - 18:46:14

hantouma correction zaz louz
[ندعوك للتسجيل في المنتدى أو التعريف بنفسك لمعاينة هذا الرابط]
1. Apr`es avoir étudié les différences et les points communs entre les quatre premi`eres classes
que nous avons distinguées, décrivez la ou les interfaces utiles et précisez les classes qui les
implémenteront.
Correction :
//fichier Drawable.java
public interface Drawable{
// choisis une couleur
void setColor( int color) ;
// retourner la couleur
int getColor() ;
// dessiner
void draw() ;
}
//fichier Moveable.java
public interface Moveable{
void translate( int dx , int dy ) ;
}
La classe Point implementera l’interface Moveable. Les classes Segment, Triangle et Rectangle
implémenteront les interfaces Moveable et Drawable.
2. Décrire la méthode static de la classe Graphique qui permet d’afficher un tableau de
figures géométriques (ce qui permettra de bien nous convaincre que la réponse `a la question
précédente est un choix judicieux).
Correction :

public class Graphique{
public static void drawGraph( Drawable[] graph ){
for( int i = 0 ; i < graph.length ; i++ ){
( graph[i] ).draw() ;
}
}
public static void main( String[] argv ){
Point p1 = new Point( 0 , 0 ) ;
Point p2 = new Point( 0 , 2 ) ;
Point p3 = new Point( 1 , 1 ) ;
Point p4 = new Point( 3 , 3 ) ;
Triangle t = new Triangle( p1 , p2 , p3 , 0 ) ;
Segment s = new Segment( p3 , p4 , 1 ) ;
Drawable [] graph = { t , s } ;
drawGraph(graph) ;
}
}
3. Vous avez déj`a étudié une classe Point. Sans écrire toutes les méthodes que vous utiliserez
pour celle-ci, donnez les constructeurs que vous utiliserez le plus vraisemblablement dans
le reste du programme, la méthode toString et le squelette de cette classe.
Correction :
public class Point implements Moveable{
private int x ;
private int y ;
public Point( int x , int y ){
this.x = x ;
this.y = y ;
}
public Point( Point p ){
this.x = p.x ;
this.y = p.y ;
}
public int getX(){
return x ;
}
public int getY(){
return y ;
}
public void setX( int x ){
this.x = x ;
}
public void setY( int y ){
this.y = y ;
}
public String toString(){
return( "(" + x + "," + y + ")" ) ;
}
public void translate( int dx , int dy ){
x = x + dx ;
y = y + dy ;
}
2
Page 3
}
4. Donnez le constructeur de la classe Segment, et la méthode qui effectuera une translation.
Correction :
public class Segment implements Drawable , Moveable{
private Point beginning ;
private Point ending ;
private int aColor ;
Segment( Point beginning , Point ending , int aColor){
this.beginning = new Point( beginning ) ;
this.ending = new Point( ending ) ;
this.aColor = aColor ;
}
public int getColor(){
return aColor ;
}
public void setColor(int aColor){
this.aColor = aColor ;
}
public void translate ( int dx , int dy ){
beginning.translate ( dx , dy ) ;
ending.translate ( dx , dy ) ;
}
public void draw(){
System.out.println( aColor + " debut = " + beginning + " fin = " + ending ) ;
}
}
Attention : le constructeur doit recopier le point en utilisant le constructeur par copie de la classe
Point! En effet, un point est modifiable par translation et peut servir `a la création d’autres figures
elles mêmes translatables.
5. Décrire enti`erement la classe Triangle.
Correction :
public class Triangle implements Drawable , Moveable{
private Segment segment1 ;
private Segment segment2 ;
private Segment segment3 ;
private int aColor ;
Triangle( Point p1 , Point p2 , Point p3 , int aColor ){
this.segment1 = new Segment( p1 , p2 , aColor ) ;
this.segment2 = new Segment( p2 , p3 , aColor ) ;
this.segment3 = new Segment( p3 , p1 , aColor ) ;
this.aColor = aColor ;
}
public void setColor( int color){
this.aColor = aColor ;
}
public int getColor(){
return aColor ;
}
public void draw(){
3
Page 4
segment1.draw() ;
segment2.draw() ;
segment3.draw() ;
}
public void translate( int dx , int dy ){
segment1.translate( dx , dy ) ;
segment2.translate( dx , dy ) ;
segment3.translate( dx , dy ) ;
}
}
الرجوع الى أعلى الصفحة اذهب الى الأسفل
vb-gang

vb-gang


عدد الرسائل : 38
العمر : 31
تاريخ التسجيل : 11/04/2011

[تم الحل]partie theorie poo 2010 : question Empty
مُساهمةموضوع: رد: [تم الحل]partie theorie poo 2010 : question   [تم الحل]partie theorie poo 2010 : question I_icon_minitimeالجمعة 1 يوليو - 18:50:59

[ندعوك للتسجيل في المنتدى أو التعريف بنفسك لمعاينة هذا الرابط]
الرجوع الى أعلى الصفحة اذهب الى الأسفل
vb-gang

vb-gang


عدد الرسائل : 38
العمر : 31
تاريخ التسجيل : 11/04/2011

[تم الحل]partie theorie poo 2010 : question Empty
مُساهمةموضوع: رد: [تم الحل]partie theorie poo 2010 : question   [تم الحل]partie theorie poo 2010 : question I_icon_minitimeالسبت 2 يوليو - 4:11:47

POO, Corrigé examen de passage 2010 (Theorique JAVA + C# +VB.NET)



JAVA CORRECTION

C# CORRECTION

VB.NET CORRECTION[ندعوك للتسجيل في المنتدى أو التعريف بنفسك لمعاينة هذا الرابط]
الرجوع الى أعلى الصفحة اذهب الى الأسفل
vb-gang

vb-gang


عدد الرسائل : 38
العمر : 31
تاريخ التسجيل : 11/04/2011

[تم الحل]partie theorie poo 2010 : question Empty
مُساهمةموضوع: رد: [تم الحل]partie theorie poo 2010 : question   [تم الحل]partie theorie poo 2010 : question I_icon_minitimeالأحد 3 يوليو - 13:13:06

bo betaoufik liljami3
الرجوع الى أعلى الصفحة اذهب الى الأسفل
 
[تم الحل]partie theorie poo 2010 : question
الرجوع الى أعلى الصفحة 
صفحة 1 من اصل 1
 مواضيع مماثلة
-
»  Correction Examen Fin Passage Année 2010 Partie langage C Tous les variantes
» |:| Theorie 2011_1TDI|:|
»  Cour Ado.Net Partie 1
» Examen Fin Passage Théorie 2012
» خاص بالتلاميذ الذين يدرسون بلغة البرمجة #C |:| تصحـــيح امتحان Theorie-Partie_POO لسنة 2011 |:|

صلاحيات هذا المنتدى:لاتستطيع الرد على المواضيع في هذا المنتدى
 :: منتدى التكوين المهني OFPPT :: Technicien Spécialisé :: TSDI - Technicien Spécialisé en Développement Informatique-
انتقل الى: