This commit is contained in:
Rémi Heredero 2021-11-28 12:40:29 +01:00
parent 394e5588cd
commit a129bfd4b5
57 changed files with 134 additions and 112 deletions

22
README.md Normal file
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).

View File

@ -1,4 +1,4 @@
package lab1;
package lab1_Introduction;
public class Fuel
{
public static void main(String args[])

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'; }
}
}

View File

@ -1,4 +1,4 @@
package lab1;
package lab1_Introduction;
public class MyProgram {
public static void main(String[] args) {

View File

@ -1,4 +1,4 @@
package lab1;
package lab1_Introduction;
public class RoomCalc
{
public static void main(String args[])

View File

@ -1,4 +1,4 @@
package lab1;
package lab1_Introduction;
public class sphere {
public static void main(String args[])
{

View File

@ -1,4 +1,4 @@
package lab1;
package lab1_Introduction;
public class swap
{

View File

@ -1,4 +1,4 @@
package lab3;
package lab2_DataTypes;
import java.io.*;
/**

View File

@ -1,4 +1,4 @@
package lab2;
package lab2_DataTypes;
public class Task1 {
public static void main(String[] args) {

View File

@ -1,4 +1,4 @@
package lab2;
package lab2_DataTypes;
import java.io.*;
/**

View File

@ -1,4 +1,4 @@
package lab2;
package lab2_DataTypes;
public class task2 {
public static void main(String[] args) {
double a,b,c;

View File

@ -1,4 +1,4 @@
package lab2;
package lab2_DataTypes;
public class task3 {

View File

@ -1,4 +1,4 @@
package lab2;
package lab2_DataTypes;
public class task4 {

View File

@ -1,4 +1,4 @@
package lab2;
package lab2_DataTypes;
public class task5 {

View File

@ -1,4 +1,4 @@
package lab2;
package lab2_DataTypes;
public class task6 {

View File

@ -1,4 +1,4 @@
package lab2;
package lab2_DataTypes;
public class task7 {

View File

@ -1,4 +1,4 @@
package lab2;
package lab2_DataTypes;
public class task8 {

View File

@ -1,4 +1,4 @@
package lab3;
package lab3_Loops;
import hevs.graphics.FunGraphics;
import java.awt.Color;

View File

@ -1,4 +1,4 @@
package lab1;
package lab3_Loops;
import java.io.*;
/**

View File

@ -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

View File

@ -1,4 +1,4 @@
package lab3;
package lab3_Loops;
public class task1 {

View File

@ -1,4 +1,4 @@
package lab3;
package lab3_Loops;
import hevs.graphics.FunGraphics;
import java.awt.Color;

View File

@ -1,4 +1,4 @@
package lab3;
package lab3_Loops;
import hevs.graphics.FunGraphics;
import java.awt.Color;

View File

@ -1,4 +1,4 @@
package lab3;
package lab3_Loops;
import hevs.graphics.FunGraphics;
import java.awt.Color;

View File

@ -1,4 +1,4 @@
package lab3;
package lab3_Loops;
import hevs.graphics.FunGraphics;
//import java.awt.Color;

View File

@ -1,4 +1,4 @@
package lab4;
package lab4_Fonctions;
import hevs.graphics.FunGraphics;
import hevs.utils.Input;

View File

@ -1,4 +1,4 @@
package lab4;
package lab4_Fonctions;
import java.io.*;
/**

View File

@ -1,4 +1,4 @@
package lab4;
package lab4_Fonctions;
public class StringFunctions {
/**
* @param s

View File

@ -1,4 +1,4 @@
package lab4;
package lab4_Fonctions;
public class task1 {

View File

@ -1,4 +1,4 @@
package lab4;
package lab4_Fonctions;
public class task2 {
public static void main(String[] args) {

View File

@ -1,4 +1,4 @@
package lab4;
package lab4_Fonctions;
public class task3 {

View File

@ -1,4 +1,4 @@
package lab6;
package lab5_SecretNumber;
import javax.swing.JFrame;
import javax.swing.JOptionPane;
import javax.swing.JPasswordField;

View File

@ -1,4 +1,4 @@
package lab5;
package lab5_SecretNumber;
import java.io.*;
/**

View File

@ -1,4 +1,4 @@
package lab5;
package lab5_SecretNumber;
import hevs.utils.Input;

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'; }
}
}

View File

@ -1,4 +1,4 @@
package lab5;
package lab6_Hangman;
import javax.swing.JFrame;
import javax.swing.JOptionPane;
import javax.swing.JPasswordField;

View File

@ -1,4 +1,4 @@
package lab6;
package lab6_Hangman;
import java.awt.Color;

View File

@ -1,4 +1,4 @@
package lab2;
package lab6_Hangman;
import java.io.*;
/**

View File

Can't render this file because it is too large.

View File

Can't render this file because it is too large.

View File

@ -1,4 +1,4 @@
package lab6;
package lab6_Hangman;
public class Person {
String surname = "";

View File

@ -1,4 +1,4 @@
package lab6;
package lab6_Hangman;
public class Task1 {
public static void main(String[] args) {

View File

@ -1,4 +1,4 @@
package lab6;
package lab6_Hangman;
import java.text.Normalizer;
import java.io.BufferedReader;
import java.io.FileReader;

View File

Can't render this file because it is too large.

View File

Can't render this file because it is too large.