modelisationreims.convertisseur
Class TextInterface

java.lang.Object
  extended by modelisationreims.convertisseur.TextInterface

public class TextInterface
extends java.lang.Object

Text Interface for reading and showing a temperature


Constructor Summary
TextInterface()
           
 
Method Summary
 double read(java.lang.String mesg, java.lang.String error)
          Read from the standard input a temperature
 void show(java.lang.String mesg, double temp)
          Show in the standard output a message for the user and a given tempearture
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TextInterface

public TextInterface()
Method Detail

read

public double read(java.lang.String mesg,
                   java.lang.String error)
Read from the standard input a temperature

Parameters:
mesg - message to be presented to the user before reading
error - error message to be presented to the user if an input mismatch exception raises
Returns:
double temperature read (or 0 input couldn't be interpreted)
See Also:
InputMismatchException

show

public void show(java.lang.String mesg,
                 double temp)
Show in the standard output a message for the user and a given tempearture

Parameters:
mesg - message to be presented to the user before the temperature
temp - temperature to be presented to the user