8/30/2023 0 Comments Atm sample program in java![]() ![]() ![]() tFont(new Font("Default", Font.PLAIN, 12)) ![]() * - declarations */Ĭolor lightGray = new Color (192, 192, 192) Ĭontainer contentPane = getContentPane() ĪtFont(new Font("Default", Font.PLAIN, 12)) ĪtText("Enter the amount:") ĪtHorizontalAlignment(JLabel.RIGHT) ĪtBounds(200, 50, 80, 20) ĪtFont(new Font("Default", Font.PLAIN, 12)) ĪtHorizontalAlignment(JTextField.CENTER) Here's the code I've written so far:import java.awt.* It has methods deposit, withdraw, getCurrentBalance and setCurrentBalance. Create a class named Account to represent bank accounts. The amount (the balance) and the state of the account is continually displayed - it is either OK or overdrawn. A second button allows a withdrawal to be made. A button allows a deposit to be made into the account. I'm writing a simple "ATM" program as part of an assignment for my beginner's level Java programming class.Here's how the assignment reads:quote:Bank Account - Write a program that simulates a bank account. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |