integratedtest.java

来自「bank account program. if there is savin」· Java 代码 · 共 31 行

JAVA
31
字号
import javax.swing.JOptionPane;
import java.lang.Double;
import java.io.*;

public class IntegratedTest
{
	public static void main(String[] args)
	{
		Integrated acc = new Integrated();
		String inp = "";
		double inn = 0;

		inp = JOptionPane.showInputDialog("Please input the deposit amount: ");
		inn = Double.parseDouble(inp);
		acc.deposit(inn);

		inp = JOptionPane.showInputDialog("Please input the withdraw amount: ");
		inn = Double.parseDouble(inp);
		acc.withdraw(inn);

		inp = JOptionPane.showInputDialog("Please input the cheque amount: ");
		inn = Double.parseDouble(inp);
		acc.issueCheque(inn);
		
		System.out.printf("\n\nThe saving part now has balance : %,.2f",acc.getSavingsBalance());
		System.out.printf("\n\nThe current part now has balance : %,.2f",acc.getCurrentBalance());
		System.out.printf("\n\nThe integrated account now has balance : %,.2f",acc.getBalance());

	}

}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?