This project involves creating a program to manage and display information about monetary values. The main components of the project include classes representing different denominations of money (e.g., bills, coins), a graphical user interface (myGUI) for user interaction, and handlers (ButtonClickListener and PrintClickListener) to process input and output.
- Bill.java
- Represents a bill with a specified dollar amount. Extends the Money class.
- ButtonClickListener.java
- Handles button click events in the GUI.
- Processes user input and interacts with other classes (SaveMoney, SaveDate, ReadDate, ReadMoney).
- Coin.java
- Represents a coin with a specified value.
- Extends the Money class.
- Dime.java
- Represents a dime coin.
- Extends the Coin class.
- Main.java
- Main class to start the program by initiating the GUI (myGUI).
- Money.java
- Represents a generic monetary value.
- Implements Serializable for object serialization.
- myGUI.java
- GUI class with functionalities for user input and output.
- Utilizes ButtonClickListener and PrintClickListener.
- Nickel.java
- Represents a nickel coin.
- Extends the Coin class.
- PrintClickListener.java
- Handles the "Save to ledger.txt" button click event.
- Initiates the PrintLedger class to save the content of a TextArea to a file.
- PrintLedger.java
- Saves the content of a TextArea to a file named "ledger.txt".
- Quarter.java
- Represents a quarter coin.
- Extends the Coin class.
- ReadDate.java
- Reads a Date object from the "date.out" file.
- Displays the date in the GUI.
- ReadMoney.java
- Reads monetary information from the "money.out" file.
- Displays the total amount of money and the quantity of each denomination in the GUI.
- SaveDate.java
- Saves the current date to the "date.out" file.
- SaveMoney.java
- Saves monetary information to the "money.out" file.
- Processes user input from the GUI.
-
Execute the main method in the Main.java class to initiate the GUI.
-
Enter a monetary value in the provided text field and click the "Count change" button.
-
Optionally, click the "Save to ledger.txt" button to save the displayed information to a file.
-
The GUI allows users to input monetary values and view the corresponding breakdown of bills and coins.
-
The program uses
serializationto save and load monetary information and the current date.



