Ajout des travaux effectuer

This commit is contained in:
2024-12-09 11:53:11 +01:00
parent 05fac8d3ae
commit c4e97e13da
558 changed files with 67900 additions and 0 deletions

Binary file not shown.

View File

@@ -0,0 +1,21 @@
public class Compteur {
private int compte;
public void plusUn()
{
this.compte++;
}
public String toString()
{
return Integer.toBinaryString(this.compte);
}
public Compteur()
{
this.compte = 5;
}
public static void main(String[] args)
{
System.out.println(toString());
}
}

Binary file not shown.

View File

@@ -0,0 +1,65 @@
public class Date {
private int year;
private int month;
private int day;
public String toString()
{
String Date = String.format("%04d-%02d-%02d", this.year, this.month, this.day);
return Date;
}
public void Lendemain()
{
if(this.month == 1 || this.month == 3 || this.month == 5 || this.month == 7 || this.month == 8 || this.month == 10)
{
if(this.day == 31)
{
this.day = 1;
this.month++;
}
}
if(this.month == 2)
{
if(this.day == 28)
{
this.day = 1;
this.month++;
}
}
if(this.month == 4 || this.month == 6 || this.month == 9 || this.month == 11)
{
if(this.day == 30)
{
this.day = 1;
this.month++;
}
}
if(this.month == 12)
{
if(this.day == 31)
{
this.day = 1;
this.month = 1;
this.year++;
}
}
else
{
this.day++;
}
}
public Date()
{
this.year = 2024;
this.month = 02;
this.day = 6;
}
public static void main(String[] args)
{
Date c = new Date();
System.out.println(c);
c.Lendemain();
System.out.println(c);
}
}