1
package mypack;
import java.util.Scanner;
public class Machine {
private int cupCount;
CoinIn jandon = new CoinIn();
int x = 0;
public Machine() {
// TODO Auto-generated constructor stub
}
public void ShowData(){
Scanner sc = new Scanner(System.in);
System.out.println("동전을 입력하시오: ");
int coin = sc.nextInt();
System.out.println("몇 잔을 원하세요: ");
int jansu = sc.nextInt();
if(coin < 200){
System.out.println("요금이 부족합니다");
return;}
else
x = jandon.calc0(coin, jansu);
System.out.println("커피" + jansu + "잔과 잔돈" + x + "원");
}
}