BankChargesDemo

BankChargesDemo - balance = Double.parseDouble(input input=JOptionPane.showInpu tDialog"input checks&quot checks =

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
/** Demo program for the BankCharges Class Chapter 6, Programming Challenge 8 */ import java.util.Scanner; import javax.swing.JOptionPane; import java.text.DecimalFormat; public class BankChargesDemo { public static void main(String[] args) { int checks; // Number of checks written double balance; // Account balance //Step10: ask the user to input balance, and checks String input=JOptionPane.showInpu tDialog("input balance");
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: balance = Double.parseDouble(input); input=JOptionPane.showInpu tDialog("input checks"); checks = Integer.parseInt(input); //step11: Create a BankCharges object using the data created in step10 BankCharges account = new BankCharges(balance, checks); //step12: call the method getFees and display the fees. System.out.println(account .getFees()); } }...
View Full Document

This note was uploaded on 12/02/2008 for the course CSCI 1301 taught by Professor Liu during the Spring '08 term at GCSU.

Ask a homework question - tutors are online