Beruflich Dokumente
Kultur Dokumente
Epreuve : Synthse
Variante: V2
Dure : 5 heures
Barme :
/ 120
Partie I : Thorie
Dossier 1: Notions de mathmatiques appliques linformatique
Binaire
100101001011
11011011
1101011100
100111110
Octal
4513
333
1534
476
Hexadcimal
94B
DB
35C
13E
F ( A , B ,C )= AC +B
2- Construire la table de vrit.
Filire
DI
Epreuve
Synthse V2(Correction)
Session
Juillet 2015
1/12
AB
Filire
DI
00
01
11
10
Epreuve
Synthse V2(Correction)
Session
Juillet 2015
2/12
F ( A , B ,C )= AC +B
SupSignes ( T,N)
Fin
Procdure SupSignes (T : tableau() ; N : Entier )
i=1
Rpter
Si( t(i) = , ou t(i)=; ou t(i)=. ou t(i) = : ou t(i)=? ou
t(i)= !) alors
Pour j=i j<n
T(j)t(j+1)
FinPour
NN-1
FinSi
Jusqu (i<=N)
Filire
DI
Epreuve
Synthse V2(Correction)
Session
Juillet 2015
3/12
Redim t(N)
Fin
MCD
Site
NomS <pi> <Indfini>
Ville
<Indfini>
1,n
Identifiant_1
Type
Avoir
Id_ype <pi>
Libelle
1,n
0,n
Identifiant_1 <pi>
Concerner
0,1
1,3
Disposer
Demande
Ndemande
P eriode
MotifRefus
0,n
Contenir
Identifiant_1
1,1
faire
PersonneAcc
1,1
CIN
<pi>
1,n
NomP
PrenomP
Age
Degresparente
Cuisine
Id_cuisine
Identifiant_1
Identifiant_1 <pi>
0,n
Equiper
0,n
Nombre <Indfini>
Employ
1,n
Matricule
<pi>
Nom
P renom
Fonction
SituationFam
Adresse
Tel
DateRecrutement
Materiel
Id_materiel <pi>
Identifiant_1 <pi>
Identifiant_1 <pi>
MLD
Filire
DI
Epreuve
Synthse V2(Correction)
Session
Juillet 2015
4/12
Site
Avoir
NomS <Non dfini>
Ville <Non dfini>
NomS <Non dfini> <pk,fk1>
FK_AVOIR_AVOIR_SITE
Id_ype <Non dfini>
<pk,fk2>
FK_CONCERNE_CONCERNER_SITE
Type
FK_AVOIR_AVOIR2_TYPE
Concerner
Id_ype
<Non dfini> <pk>
Id_cuisine <Non dfini> <fk>
Libelle
<Non dfini>
NomS
<Non dfini> <pk,fk1>
Ndemande <Non dfini> <pk,fk2>
FK_CONCERNE_CONCERNER_DEMANDE
FK_TYPE_DISPOSER2_CUISINE
Demande
Ndemande
Matricule
Periode
MotifRefus
Cuisine
Id_cuisine <Non dfini> <pk>
Id_ype
<Non dfini> <fk>
PersonneAcc
CIN
NomP
PrenomP
Age
FK_CONTENIR_CONTENIR_DEMANDE
Degresparente
FK_DEMANDE_FAIRE_EMPLOY
FK_CUISINE_DISPOSER_TYPE
FK_EQUIPER_EQUIPER_CUISINE
FK_CONTENIR_CONTENIR2_PERSONNE
Contenir
Employ
Matricule
Nom
Prenom
Fonction
SituationFam
Adresse
Tel
DateRecrutement
Equiper
Id_cuisine <Non dfini> <pk,fk1>
Id_materiel <Non dfini> <pk,fk2>
Nombre
<Non dfini>
FK_EQUIPER_EQUIPER2_MATERIEL
Materiel
Id_materiel <Non dfini> <pk>
Filire
DI
Epreuve
Synthse V2(Correction)
Session
Juillet 2015
5/12
Epreuve
Synthse V2(Correction)
Session
Juillet 2015
6/12
n=n-1;
for(j=k;j<=n;j++){
les_quartiers[j]=les_quartiers[j+1];
}
}
}
}
//=========Sauvegarder dans un fichier==============
void sauvegarder()
{int i;
char nomf[20];
printf("Saisir le nom du fichier: ");
scanf("%s",&nomf);
FILE* fichier = NULL;
fichier = fopen(nomf,"w");
if (fichier != NULL)
{
for(i=1;i<=n;i++)
{
fprintf(fichier,"%s/%d/%d
\n",les_quartiers[i].nom,les_quartiers[i].surface,les_quartiers[i].nbrhabitant);
}
fclose (fichier);
}
else
printf("Impossible d'ouvrir le fichier test.txt");
}
}
//=========Quitter==============
void quitter(){
system("cls");
printf("\n\n
printf("\n\n
}
Main
\t------------FIN-----------\n\n\n");
\t------------MERCI-----------\n\n\n");
int main ()
{
do{
printf("**************Gestion des quartiers********************* \n");
printf("
<1. Saisir un quartier---------------------------- \n");
printf("
<2. Afficher la liste des quartiers-------------- \n");
printf("
<3. Rechercher un quartier ---------------------\n");
printf("
<4. Supprimer un quartier-----------------------\n");
printf("
<5. Sauvegarder---------------------------------- \n");
printf("
<6. Quitter----------------------------------------- \n");
Filire
DI
Epreuve
Synthse V2(Correction)
Session
Juillet 2015
7/12
printf("
======
\n");
this.nserie = nserie;
this.pht = pht;
this.qte_stk = qte_stk;
this.qte_min = qte_min;
}
public new string ToString()
{
return this.nserie +" "+this.pht +" "+ this.qte_stk +" "+ this.qte_min ;
Filire
DI
Epreuve
Synthse V2(Correction)
Session
Juillet 2015
8/12
}
public void Sapprovisionner (int qte)
{
this.qte_stk=this.qte_stk+qte;
}
public void Achat(int qte)
{
this.qte_stk = this.qte_stk - qte;
if (this.qte_stk < this.qte_min)
Console.WriteLine("Attention! il faut s'approvisionner");
}
Classe Habit
class Habit : Article
{
private int taille;
private string couleur;
public Habit (string nserie, float pht, int qte_stk, int
qte_min,int taille,string couleur)
:base( nserie, pht, qte_stk, qte_min)
{
this.taille = taille;
this.couleur = couleur;
}
public new string ToString()
{
return base.ToString() + " " + this.taille + " " +
this.couleur;
}
}
Classe Electromnager
class Electromenager : Article
{
private float poids;
private int duree;
public Electromenager(string nserie, float pht, int qte_stk, int
qte_min, float poids, int duree)
: base(nserie, pht, qte_stk, qte_min)
{
this.poids = poids;
this.duree = duree;
}
Filire
DI
Epreuve
Synthse V2(Correction)
Session
Juillet 2015
9/12
class Program
{
static void Main(string[] args)
{
Television t1 = new Television("tv123", 80,13.50F, 3500, "lcd", 100);
Console.WriteLine(t1.ToString());
Console.WriteLine(t1.ClasseEneergtique());
VeloElec v1 = new VeloElec("v122", 250, 25, 11500, 50.50F,
560);
v1.Rouler(20.50F);
v1.Charger(120);
Console.WriteLine(v1.ToString());
Console.ReadLine();
}
comboBox1.Items.Add("Studio");
comboBox1.Items.Add("Appartement");
comboBox1.Items.Add("Maison");
Filire
DI
Epreuve
Synthse V2(Correction)
Session
Juillet 2015
10/12
2.
textBox1.Text = "";
textBox2.Text = "";
textBox3.Text = "";
comboBox1.Text = "";
textBox4.Text = "";
3.
dataGridView1.Rows.Add(textBox1.Text, textBox2.Text,
textBox3.Text,comboBox1.Text, textBox4.Text );
4.
f = new BinaryFormatter();
FileStream fs = new FileStream("Logements.dat", FileMode.OpenOrCreate,
FileAccess.Write);
f.Serialize(fs, Logements);
Filire
DI
Epreuve
Synthse V2(Correction)
Session
Juillet 2015
11/12
fs.Close();
Filire
DI
Epreuve
Synthse V2(Correction)
Session
Juillet 2015
12/12