25 lines
610 B
Java
25 lines
610 B
Java
/*
|
|
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
|
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
|
|
*/
|
|
package pagamentionline;
|
|
|
|
/**
|
|
*
|
|
* @author Verde
|
|
*/
|
|
public class Pagamento {
|
|
double importo;
|
|
|
|
public Pagamento(double importo) {
|
|
this.importo = importo;
|
|
}
|
|
|
|
public String paga() {
|
|
return "Pagamento di " + this.importo + " euro effettuato.";
|
|
}
|
|
|
|
public String paga(String descrizione) {
|
|
return "Pagamento di " + this.importo + " euro per: " + descrizione;
|
|
}
|
|
} |