34 lines
1015 B
Java
34 lines
1015 B
Java
/*
|
|
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
|
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Main.java to edit this template
|
|
*/
|
|
package pagamentionline;
|
|
|
|
import java.util.Scanner;
|
|
|
|
/**
|
|
*
|
|
* @author Verde
|
|
*/
|
|
public class PagamentiOnline {
|
|
|
|
/**
|
|
* @param args the command line arguments
|
|
*/
|
|
|
|
static Scanner sc = new Scanner(System.in);
|
|
|
|
public static void main(String[] args) {
|
|
Pagamento contanti = new Pagamento(25.25);
|
|
PagamentoCartaCredito intesa = new PagamentoCartaCredito(250.99, "1234-5678-9101-3456");
|
|
PagamentoPayPal pagoPalla = new PagamentoPayPal(2001.27, "'@'@[::1]");
|
|
|
|
System.out.println(contanti.paga());
|
|
System.out.println(contanti.paga("Pane e acqua"));
|
|
System.out.println(intesa.paga());
|
|
System.out.println(intesa.paga("Kompiutah"));
|
|
System.out.println(pagoPalla.paga());
|
|
System.out.println(pagoPalla.paga("Megah Kompiutah"));
|
|
}
|
|
}
|