Advertisement
Guest User

Untitled

a guest
Feb 26th, 2017
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.73 KB | None | 0 0
  1. import javax.swing.JOptionPane;
  2.  
  3. // Assignment #1
  4.  
  5. public class Assignment
  6. {
  7. public static void main(String[] args)
  8. {
  9. String inputString;
  10. String name;
  11. int number;
  12. double creditLimit;
  13. double previousBalance;
  14. double currentPurchases;
  15. double payments;
  16. double creditReturns;
  17.  
  18.  
  19. // Customer's Name
  20. name = JOptionPane.showInputDialog("What is your name?");
  21.  
  22.  
  23. // Customer's Credit Card number
  24. inputString = JOptionPane.showInputDialog("What is your credit card number?);
  25. number = Integer.parseInt(inputString);
  26.  
  27.  
  28. // Customer's Credit Limit
  29. inputString = JOptionPane.showInputDialog("What is your credit limit?);
  30. creditLimit = Double.parseDouble(inputString);
  31.  
  32.  
  33. // Customer's Previous Balance
  34. inputString = JOptionPane.showInputDialog("What was your previous balnce?);
  35. previousBalance = Double.parseDouble(inputString);
  36.  
  37.  
  38. // Customer's Current Purchases
  39. inputString = JOptionPane.showInputDialog("What are your current purchases?);
  40. currentPurchases = Double.parseDouble(inputString);
  41.  
  42.  
  43. // Customer's Payments
  44. inputString = JOptionPane.showInputDialog("What is your credit limit?);
  45. payments = Double.parseDouble(inputString);
  46.  
  47.  
  48. // Customer's Credits/Returns
  49. inputString = JOptionPane.showInputDialog("What is your credit limit?);
  50. creditReturns = Double.parseDouble(inputString);
  51.  
  52. JOptionPane.showMessageDialog("Hello " + name + ")
  53.  
  54. System.exit(0);
  55. }
  56. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement