Python-like input method and README update
This commit is contained in:
parent
114305d602
commit
6a8e7a786d
|
@ -5,5 +5,14 @@
|
||||||
* [Guião](https://github.com/TiagoRG/uaveiro-leci/tree/master/1ano/2semestre/poo/guides/POO-2021-aula02.pdf)
|
* [Guião](https://github.com/TiagoRG/uaveiro-leci/tree/master/1ano/2semestre/poo/guides/POO-2021-aula02.pdf)
|
||||||
* [Slides](https://github.com/TiagoRG/uaveiro-leci/tree/master/1ano/2semestre/poo/slides/POO_02_ControloFluxo.pdf)
|
* [Slides](https://github.com/TiagoRG/uaveiro-leci/tree/master/1ano/2semestre/poo/slides/POO_02_ControloFluxo.pdf)
|
||||||
|
|
||||||
|
### Exercise List
|
||||||
|
| Exercise Number | File Name | Exercise Number | File Name |
|
||||||
|
|-----------------|----------------------------------------------------------------------------------------------------------------------------------------|-----------------|--------------------------------------------------------------------------------------------------------------------------------------------|
|
||||||
|
| 1 | [KmToMiles.java](https://github.com/TiagoRG/uaveiro-leci/blob/master/1ano/2semestre/poo/src/aula02/KmToMiles.java) | 6 | [SecsToHMS.java](https://github.com/TiagoRG/uaveiro-leci/blob/master/1ano/2semestre/poo/src/aula02/SecsToHMS.java) |
|
||||||
|
| 2 | [CelciusToFahrenheit.java](https://github.com/TiagoRG/uaveiro-leci/blob/master/1ano/2semestre/poo/src/aula02/CelciusToFahrenheit.java) | 7 | [DistanceBetweenPoints.java](https://github.com/TiagoRG/uaveiro-leci/blob/master/1ano/2semestre/poo/src/aula02/DistanceBetweenPoints.java) |
|
||||||
|
| 3 | [EnergyToHeatWater.java](https://github.com/TiagoRG/uaveiro-leci/blob/master/1ano/2semestre/poo/src/aula02/EnergyToHeatWater.java) | 8 | [PythagoreanTheorem.java](https://github.com/TiagoRG/uaveiro-leci/blob/master/1ano/2semestre/poo/src/aula02/PythagoreanTheorem.java) |
|
||||||
|
| 4 | [Investment.java](https://github.com/TiagoRG/uaveiro-leci/blob/master/1ano/2semestre/poo/src/aula02/Investment.java) | 9 | [Countdown.java](https://github.com/TiagoRG/uaveiro-leci/blob/master/1ano/2semestre/poo/src/aula02/Countdown.java) |
|
||||||
|
| 5 | [AverageSpeed.java](https://github.com/TiagoRG/uaveiro-leci/blob/master/1ano/2semestre/poo/src/aula02/AverageSpeed.java) | 10 | [RealNumbers.java](https://github.com/TiagoRG/uaveiro-leci/blob/master/1ano/2semestre/poo/src/aula02/RealNumbers.java) |
|
||||||
|
|
||||||
---
|
---
|
||||||
*Pode conter erros, caso encontre algum, crie um* [*ticket*](https://github.com/TiagoRG/uaveiro-leci/issues/new)
|
*Pode conter erros, caso encontre algum, crie um* [*ticket*](https://github.com/TiagoRG/uaveiro-leci/issues/new)
|
||||||
|
|
|
@ -3,6 +3,11 @@ package utils;
|
||||||
import java.util.Scanner;
|
import java.util.Scanner;
|
||||||
|
|
||||||
public class UserInput {
|
public class UserInput {
|
||||||
|
public static String input(Scanner sin, String message) {
|
||||||
|
System.out.print(message);
|
||||||
|
return sin.next();
|
||||||
|
}
|
||||||
|
|
||||||
public static double getNumberBetween(Scanner sin, double min, double max) {
|
public static double getNumberBetween(Scanner sin, double min, double max) {
|
||||||
double input;
|
double input;
|
||||||
do {
|
do {
|
||||||
|
|
Loading…
Reference in New Issue