Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import javax.swing.JOptionPane;
- // Assignment #1
- public class Assignment
- {
- public static void main(String[] args)
- {
- String inputString;
- String name;
- int number;
- double creditLimit;
- double previousBalance;
- double currentPurchases;
- double payments;
- double creditReturns;
- // Customer's Name
- name = JOptionPane.showInputDialog("What is your name?");
- // Customer's Credit Card number
- inputString = JOptionPane.showInputDialog("What is your credit card number?);
- number = Integer.parseInt(inputString);
- // Customer's Credit Limit
- inputString = JOptionPane.showInputDialog("What is your credit limit?);
- creditLimit = Double.parseDouble(inputString);
- // Customer's Previous Balance
- inputString = JOptionPane.showInputDialog("What was your previous balnce?);
- previousBalance = Double.parseDouble(inputString);
- // Customer's Current Purchases
- inputString = JOptionPane.showInputDialog("What are your current purchases?);
- currentPurchases = Double.parseDouble(inputString);
- // Customer's Payments
- inputString = JOptionPane.showInputDialog("What is your credit limit?);
- payments = Double.parseDouble(inputString);
- // Customer's Credits/Returns
- inputString = JOptionPane.showInputDialog("What is your credit limit?);
- creditReturns = Double.parseDouble(inputString);
- JOptionPane.showMessageDialog("Hello " + name + ")
- System.exit(0);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement