This commit is contained in:
Klagarge committed 2021-11-28 12:40:29 +01:00
1 parent 394e5588cd
commit a129bfd4b5
57 files changed
+134 -112

No files matched your search

+22
View File
@@ -0,0 +1,22 @@
## Informatic 1 in HEVS - Practice- Rémi Heredero
All my work for labo during the first semester in engineering school of Wallis for Industrial Systems.
All the practical exercices come to the modul INF1 in HES-SO Valais/Wallis.
It's only some small labo on java. Probably nothing interresant, but maybe it can help someone one day. I store by labs in src for have only one Java project for all thoses labs.
## Folder Structure
The workspace contains two folders by default, where:
- `src`: the folder to maintain sources
- `lib`: the folder to maintain dependencies
Meanwhile, the compiled output files will be generated in the `bin` folder by default.
> If you want to customize the folder structure, open `.vscode/settings.json` and update the related settings there.
## Dependency Management
The `JAVA PROJECTS` view allows you to manage your dependencies. More details can be found [here](https://github.com/microsoft/vscode-java-dependency#manage-dependencies).
@@ -1,4 +1,4 @@
package lab1;
package lab1_Introduction;
public class Fuel
{
public static void main(String args[])
+74
View File
@@ -0,0 +1,74 @@
package lab1_Introduction;
import java.io.*;
/**
* The Class Input is here to enter data with the keyboard.<br>
* The types below are supported by the Input class. <br><br>
* - String <br> - Integer (int) <br> - Double (double) - Boolean (boolean) <br> - Character (char) <br> <br><br>
* @see #readString()
* @see #readInt()
* @see #readDouble()
* @see #readBoolean()
* @see #readChar()
*/
public class Input
{
/**
* Reads a String from the console.
* @return The typed string
* @see java.lang.String
*/
public static String readString()
{
BufferedReader stdin = new BufferedReader(new InputStreamReader(System.in));
try {return stdin.readLine(); }
catch (Exception ex) { return "";}
}
/**
* Reads an Integer from the console.
* @return The typed Integer or 0 if the typed Integer is invalid
* @see java.lang.Integer
*/
public static int readInt()
{
BufferedReader stdin = new BufferedReader(new InputStreamReader(System.in));
try { return Integer.parseInt(stdin.readLine()); }
catch (Exception ex) { return 0; }
}
/**
* Reads a Double from the console.
* @return The typed Double or 0 if the typed Double is invalid
* @see java.lang.Double
*/
public static double readDouble()
{
BufferedReader stdin = new BufferedReader(new InputStreamReader(System.in));
try { return Double.parseDouble(stdin.readLine()); }
catch (Exception ex) { return 0; }
}
/**
* Reads a boolean from the console.
* @return The typed boolean or false if the typed boolean is other than "true"
*/
public static boolean readBoolean()
{
BufferedReader stdin = new BufferedReader(new InputStreamReader(System.in));
try { return (Boolean.valueOf(stdin.readLine())).booleanValue(); }
catch (Exception ex) {return false; }
}
/**
* Reads a char from the console.
* @return The typed char or the character 0 if the typed char is invalid
*/
public static char readChar()
{
BufferedReader stdin = new BufferedReader(new InputStreamReader(System.in));
try { return stdin.readLine().charAt(0); }
catch (Exception ex) {return '\0'; }
}
}
@@ -1,4 +1,4 @@
package lab1;
package lab1_Introduction;
public class MyProgram {
public static void main(String[] args) {
@@ -1,4 +1,4 @@
package lab1;
package lab1_Introduction;
public class RoomCalc
{
public static void main(String args[])
@@ -1,4 +1,4 @@
package lab1;
package lab1_Introduction;
public class sphere {
public static void main(String args[])
{
@@ -1,4 +1,4 @@
package lab1;
package lab1_Introduction;
public class swap
{
File renamed without changes.
@@ -1,4 +1,4 @@
package lab3;
package lab2_DataTypes;
import java.io.*;
/**
@@ -1,4 +1,4 @@
package lab2;
package lab2_DataTypes;
public class Task1 {
public static void main(String[] args) {
@@ -1,4 +1,4 @@
package lab2;
package lab2_DataTypes;
import java.io.*;
/**
@@ -1,4 +1,4 @@
package lab2;
package lab2_DataTypes;
public class task2 {
public static void main(String[] args) {
double a,b,c;
@@ -1,4 +1,4 @@
package lab2;
package lab2_DataTypes;
public class task3 {
@@ -1,4 +1,4 @@
package lab2;
package lab2_DataTypes;
public class task4 {
@@ -1,4 +1,4 @@
package lab2;
package lab2_DataTypes;
public class task5 {
@@ -1,4 +1,4 @@
package lab2;
package lab2_DataTypes;
public class task6 {
@@ -1,4 +1,4 @@
package lab2;
package lab2_DataTypes;
public class task7 {
@@ -1,4 +1,4 @@
package lab2;
package lab2_DataTypes;
public class task8 {
@@ -1,4 +1,4 @@
package lab3;
package lab3_Loops;
import hevs.graphics.FunGraphics;
import java.awt.Color;
@@ -1,4 +1,4 @@
package lab1;
package lab3_Loops;
import java.io.*;
/**
@@ -1,4 +1,4 @@
package lab3;
package lab3_Loops;
/**
* This class offers a simple calculator which computes three standard
* operations on two numbers entered with the console
@@ -1,4 +1,4 @@
package lab3;
package lab3_Loops;
public class task1 {
@@ -1,4 +1,4 @@
package lab3;
package lab3_Loops;
import hevs.graphics.FunGraphics;
import java.awt.Color;
@@ -1,4 +1,4 @@
package lab3;
package lab3_Loops;
import hevs.graphics.FunGraphics;
import java.awt.Color;
@@ -1,4 +1,4 @@
package lab3;
package lab3_Loops;
import hevs.graphics.FunGraphics;
import java.awt.Color;
@@ -1,4 +1,4 @@
package lab3;
package lab3_Loops;
import hevs.graphics.FunGraphics;
//import java.awt.Color;
File renamed without changes.
@@ -1,4 +1,4 @@
package lab4;
package lab4_Fonctions;
import hevs.graphics.FunGraphics;
import hevs.utils.Input;
@@ -1,4 +1,4 @@
package lab4;
package lab4_Fonctions;
import java.io.*;
/**
@@ -1,4 +1,4 @@
package lab4;
package lab4_Fonctions;
public class StringFunctions {
/**
* @param s
@@ -1,4 +1,4 @@
package lab4;
package lab4_Fonctions;
public class task1 {
@@ -1,4 +1,4 @@
package lab4;
package lab4_Fonctions;
public class task2 {
public static void main(String[] args) {
@@ -1,4 +1,4 @@
package lab4;
package lab4_Fonctions;
public class task3 {
File renamed without changes.
@@ -1,4 +1,4 @@
package lab6;
package lab5_SecretNumber;
import javax.swing.JFrame;
import javax.swing.JOptionPane;
import javax.swing.JPasswordField;
@@ -1,4 +1,4 @@
package lab5;
package lab5_SecretNumber;
import java.io.*;
/**
@@ -1,4 +1,4 @@
package lab5;
package lab5_SecretNumber;
import hevs.utils.Input;
-74
View File
@@ -1,74 +0,0 @@
package lab6;
import java.io.*;
/**
* The Class Input is here to enter data with the keyboard.<br>
* The types below are supported by the Input class. <br><br>
* - String <br> - Integer (int) <br> - Double (double) - Boolean (boolean) <br> - Character (char) <br> <br><br>
* @see #readString()
* @see #readInt()
* @see #readDouble()
* @see #readBoolean()
* @see #readChar()
*/
public class Input
{
/**
* Reads a String from the console.
* @return The typed string
* @see java.lang.String
*/
public static String readString()
{
BufferedReader stdin = new BufferedReader(new InputStreamReader(System.in));
try {return stdin.readLine(); }
catch (Exception ex) { return "";}
}
/**
* Reads an Integer from the console.
* @return The typed Integer or 0 if the typed Integer is invalid
* @see java.lang.Integer
*/
public static int readInt()
{
BufferedReader stdin = new BufferedReader(new InputStreamReader(System.in));
try { return Integer.parseInt(stdin.readLine()); }
catch (Exception ex) { return 0; }
}
/**
* Reads a Double from the console.
* @return The typed Double or 0 if the typed Double is invalid
* @see java.lang.Double
*/
public static double readDouble()
{
BufferedReader stdin = new BufferedReader(new InputStreamReader(System.in));
try { return Double.parseDouble(stdin.readLine()); }
catch (Exception ex) { return 0; }
}
/**
* Reads a boolean from the console.
* @return The typed boolean or false if the typed boolean is other than "true"
*/
public static boolean readBoolean()
{
BufferedReader stdin = new BufferedReader(new InputStreamReader(System.in));
try { return (Boolean.valueOf(stdin.readLine())).booleanValue(); }
catch (Exception ex) {return false; }
}
/**
* Reads a char from the console.
* @return The typed char or the character 0 if the typed char is invalid
*/
public static char readChar()
{
BufferedReader stdin = new BufferedReader(new InputStreamReader(System.in));
try { return stdin.readLine().charAt(0); }
catch (Exception ex) {return '\0'; }
}
}
File renamed without changes.
@@ -1,4 +1,4 @@
package lab5;
package lab6_Hangman;
import javax.swing.JFrame;
import javax.swing.JOptionPane;
import javax.swing.JPasswordField;
@@ -1,4 +1,4 @@
package lab6;
package lab6_Hangman;
import java.awt.Color;
@@ -1,4 +1,4 @@
package lab2;
package lab6_Hangman;
import java.io.*;
/**
File renamed without changes.
Can't render this file because it is too large.
File renamed without changes.
Can't render this file because it is too large.
@@ -1,4 +1,4 @@
package lab6;
package lab6_Hangman;
public class Person {
String surname = "";
@@ -1,4 +1,4 @@
package lab6;
package lab6_Hangman;
public class Task1 {
public static void main(String[] args) {
@@ -1,4 +1,4 @@
package lab6;
package lab6_Hangman;
import java.text.Normalizer;
import java.io.BufferedReader;
import java.io.FileReader;
File renamed without changes.
File renamed without changes.
File renamed without changes.
Can't render this file because it is too large.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Can't render this file because it is too large.
File renamed without changes.