Service charges are $0.10 for a deposit and $0.15 for a check. If a check forces the balance to drop below $500.00 at any point during the month, a service charge of $5.00 is assessed but only for the first time this happens. Anytime the balance drops below $50.00, the program should print a warning message. If a check results in a negative balance, an additional service charge of $10.00 should be assessed. A transaction takes the form of an int number (the transaction code), followed by a double number (the transaction amount). If the int number is a 1, then the double number is the amount of a check. If the int number is 2, then the double number is the amount of a deposit. The last transaction is 0 with no number to follow it. Use the JOptionPane to produce the dialog.
Use proper style and indentation, efficient programming techniques and meaningful variable and method names according to Java conventions.
These solutions may offer step-by-step problem-solving explanations or good writing examples that include modern styles of formatting and construction of bibliographies out of text citations and references. Students may use these solutions for personal skill-building and practice. Unethical use is strictly forbidden.package assignment.pkg2;
public class Main
//define a CheckingAccount object to keep trach of the
// public static double initialBalance, transactionAmount;
// public static int transactionCode;
private static boolean firstTime = true;
private static CheckingAccount C ;
// format the currentcy
private static NumberFormat formatter = NumberFormat.getCurrencyInstance(Locale.US);
public static void main(String args)
//defines local variables
//get initial balance from the user
//perform in a loop until the transaction code = 0
//get the transaction code from the user
//and process it with appropriate helper method
//When loop ends show final balance to user
// The program should read the initial balance for the month,
// followed by a series of transactions.
initialBal = JOptionPane.showInputDialog("Enter your initial balance: ");
initialBalance = Double.parseDouble(initialBal);
C = new CheckingAccount(initialBalance);...
By purchasing this solution you'll be able to access the following files: