Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
1959b35
Ajout Ex1 UML et Ex1 CPP
SwissMaverick Nov 26, 2025
bbcabf9
Merge branch 'PBYetml:main' into main
SwissMaverick Nov 26, 2025
a7ade03
Ajout exercices
SwissMaverick Nov 26, 2025
747bcd0
Shmol update
SwissMaverick Nov 26, 2025
a975efc
Merge branch 'PBYetml:main' into main
SwissMaverick Jan 5, 2026
4f57e0c
Ajout Ex3
SwissMaverick Jan 5, 2026
60e6d3c
Change in files order
SwissMaverick Jan 7, 2026
d7dff7b
Ajout Ex3
SwissMaverick Jan 7, 2026
48e2920
C# demo
SwissMaverick Jan 12, 2026
5d10016
C# demo
SwissMaverick Jan 12, 2026
87b9e7c
C# demo
SwissMaverick Jan 12, 2026
746de40
Update C# demo
SwissMaverick Jan 14, 2026
092dd95
Merge branch 'PBYetml:main' into main
SwissMaverick Jan 19, 2026
84e2f36
Ex5
SwissMaverick Jan 19, 2026
ffe01dd
Exercices
SwissMaverick Jan 20, 2026
3aee3f0
Ajout TEST2
SwissMaverick Jan 21, 2026
0bd7b27
Ajout C#
SwissMaverick Jan 26, 2026
14cc9d9
Merge branch 'PBYetml:main' into main
SwissMaverick Jan 29, 2026
d3c132c
Ajout Ex1 C#
SwissMaverick Feb 2, 2026
51ea26e
Ex1 C# terminé
SwissMaverick Feb 2, 2026
fec7716
Merge branch 'PBYetml:main' into main
SwissMaverick Feb 23, 2026
7f86edf
Shmol changes
SwissMaverick Feb 23, 2026
46a8703
3 big balls
SwissMaverick Feb 23, 2026
56b89b5
3 big balls
SwissMaverick Feb 23, 2026
9320fad
Merge branch 'PBYetml:main' into main
SwissMaverick Feb 25, 2026
d6f02d7
yes ?
SwissMaverick Feb 25, 2026
50f76d0
Déplacement d'un projet
SwissMaverick Feb 25, 2026
72168d7
demo Java
SwissMaverick Mar 9, 2026
a521d1d
Update Demonstration_Eclipse.java
SwissMaverick Mar 16, 2026
1b7f46c
Create Arme.java
SwissMaverick Mar 16, 2026
e88a108
Merge branch 'PBYetml:main' into main
SwissMaverick Mar 16, 2026
c4589ed
truc java
SwissMaverick Mar 23, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
10 changes: 10 additions & 0 deletions DemoJava/Demonstration_Eclipse/.classpath
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry exported="true" kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-17">
<attributes>
<attribute name="module" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
</classpath>
1 change: 1 addition & 0 deletions DemoJava/Demonstration_Eclipse/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/bin/
17 changes: 17 additions & 0 deletions DemoJava/Demonstration_Eclipse/.project
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>Demonstration_Eclipse</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
eclipse.preferences.version=1
encoding/<project>=UTF-8
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=17
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
org.eclipse.jdt.core.compiler.release=enabled
org.eclipse.jdt.core.compiler.source=17
30 changes: 30 additions & 0 deletions DemoJava/Demonstration_Eclipse/src/Demonstration_Eclipse/Arme.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
package Demonstation_Eclipse;

public class couteau extends arme
{

//-- Attributs --//
// Private
private String mTypeArme;
private String mModele;

// Constructeur
public couteau()
{
super();
mDegats = 10;
}
public couteau(String Modele, int degats)
{ }

@Override
public int Frapper()
{
int degatsInfliges = 0;

return degatsInfilges;
}



}
Original file line number Diff line number Diff line change
@@ -0,0 +1,145 @@
package Demonstration_Eclipse;

import java.lang.*;
import java.math.*;
import java.util.*;

public class Demonstration_Eclipse
{
//-- attributs --//
//-- visibilité
public int varA1; //-> public
private int varA2; //-> privé
protected int varA3; //-> protégé

//-- énumération --//
//-- complexe
public enum e_MYBALLS
{
// 1. Déclarer les constantes avec leurs valeurs entre parenthèses
ABDULALILSHISHA(1), RHALIDKASHMIRI(2); // Séparés par des virgules, avec un point-virgule à la fin !

// 2. Créer une variable pour stocker la valeur
private final int ballSack;

// 3. Créer le constructeur (toujours privé ou package-private dans un enum)
e_MYBALLS(int ballSack)
{
this.ballSack = ballSack;
}

// 4. Créer un "getter" pour pouvoir récupérer cette valeur plus tard
public int getValeur()
{
return ballSack;
}
}

//-- basique
public enum e_YARIS
{
bigBlock, bigCock;
}

//-> visibilité -> public

public static void main(String[] args)
{
//-- types primitifs --//
//-- entier
byte varByte; //-> 1 octet
short varShort; //-> 2 octets -> valeur numérique
char varChar; //-> caractère -> unicode

int varInt; //-> 4 octets
long varLong; //-> 8 octets

//-- réel
float varF; //-> 4 octets
double varD; //-> 8 octets

//-- autre --//
boolean varB; //-> 1 octet
//-> énumération -> déclaration
e_MYBALLS varEnum = e_MYBALLS.ABDULALILSHISHA;

varInt = varEnum.getValeur();

//-- Objet --//
String maChaine = "Hello World"; //-> Chaîne de caractère
Scanner monClavier = new Scanner(System.in); //-> Objet lié au clavier

//-- Exemple assignation sur variable primaire --//
varB = true; //-> Assignation sur un booléen

//-- Assignation d'un caractère --//
varChar = 'A'; //-> Caractère
varChar = '\u0043'; //-> Unicode

//-- Cast -> entier à entier -> petit à grand --//
varByte = (byte)0xFF; //-> Cst numérique -> byte
varChar = (char)varByte; //-> byte -> char
varShort = (short)0xFFFF; //-> Cst numérique -> short
varInt = varShort; //-> short -> entier

//-- Cast cst numérique -> float --//
varF = 3.14F;
varF = (float)3.14;
varD = 3.14;
varD = Math.PI;

//-- Affichage en mode console --//
//-> Exemple chaîne de caractère manuelle avec retour à la ligne automatique
System.out.print("\n" + maChaine);
System.out.print("\n");
System.out.println("-> demo <-");

System.out.println("Valeur Boolean : " + varB);
System.out.println("Valeur Entier : " + varByte);
System.out.println("Valeur Reel : " + varD);

System.out.printf("Valeur PI avec 3 décimales : %.3f", Math.PI);

System.out.printf("\n Format hexa %x", varInt); //-> Hexadéciaml
System.out.printf("\n Format octal %o", varInt); //-> Octal

maChaine = Integer.toBinaryString(varInt);
System.out.printf("\n Format binaire ob%s", varInt); //-> Binaire

//-- Récupération information du clavier --//
//-> Chaîne de caractères
System.out.print("\n Insérer une valeur entière : ");
maChaine = monClavier.next(); //-> Chaîne de caractère

//-> entier
System.out.print("Insérer une valeur entière : ");
varInt = monClavier.nextInt();

//-> float
System.out.print("Insérer une valeur réelle : ");

try
{
varD = monClavier.nextDouble();
}
catch(Exception data)
{
System.out.println(data.getLocalizedMessage());
System.out.println(data.getMessage());
}
finally
{
monClavier.useLocale(Locale.ENGLISH);
varD = monClavier.nextDouble();
}

if(varD == 3.14)
{
System.out.println("Exception levee !!!");
}

// TODO Auto-generated method stub

}

}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

<ItemGroup>
<Compile Remove="Ex1.cs" />
</ItemGroup>

<ItemGroup>
<None Include="Ex1.cs" />
</ItemGroup>

</Project>
25 changes: 25 additions & 0 deletions SolutionEtudiants/JJE/C#/CSharp_Conversion/CSharp_Conversion.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.2.32630.192
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CSharp_Conversion", "CSharp_Conversion.csproj", "{393734A5-C257-4A4B-BDBA-6C3C9C3A5717}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{393734A5-C257-4A4B-BDBA-6C3C9C3A5717}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{393734A5-C257-4A4B-BDBA-6C3C9C3A5717}.Debug|Any CPU.Build.0 = Debug|Any CPU
{393734A5-C257-4A4B-BDBA-6C3C9C3A5717}.Release|Any CPU.ActiveCfg = Release|Any CPU
{393734A5-C257-4A4B-BDBA-6C3C9C3A5717}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {40D5F52C-6DB4-4787-8950-C70D1BC53E6F}
EndGlobalSection
EndGlobal
80 changes: 80 additions & 0 deletions SolutionEtudiants/JJE/C#/CSharp_Conversion/Ex1.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
using System;
using System.Windows.Forms;

namespace Ex1
{

}
int main (void)
{
char UserAnswer;
int ValA, ValB;
// Variables pour test A et B
short i;
short ValB1;
double ValB2;

printf("Exercice 1 : Huber Christian \n");
printf("Solution en C a trandformer en C++ \n");


do {
printf("Test A ou B, Q pour Quitter \n");
scanf_s("%c%*c", &UserAnswer, 2);

switch (UserAnswer) {
case 'A':
case 'a':
printf("TestA: entrez un nombre entre 1 et 9 \n");
scanf_s("%d%*c", &ValA);

if (ValA > 9)
{
ValA = 9;
printf("TestA: ValA limitee a 9 \n");
}
if (ValA == 0)
{
ValA = 1;
printf("TestA: ValA forcee a 1 \n");
}
if (ValA > 0 )
{
printf("%d ", ValA);
for (i=0; i < ValA ; i++)
{
printf ("*");
}
printf("\n"); // saut de ligne
}
else
{
printf("TestA: ValA est negatif ! \n");
}
break;

case 'B':
case 'b':
printf("TestB: entrez une valeur entre 0 et 9 \n");
scanf_s("%d%*c", &ValB);

if (ValB >= 0 && ValB <=9 )
{
for (i=0; i < ValB; i++) {
ValB1 = 100 + (10 * i);
ValB2 = ValB1 / 10000.0;
printf("TestB: i= %d ValB1 = %d ValB2 = %lf \n", i, ValB1, ValB2);
}
}
else
{
printf("TestB: ValB n'est pas entre 0 et 9 ! \n");
}
break;

} // end switch

} while (!(UserAnswer == 'Q' || UserAnswer == 'q'));

return (0);
}
Loading