Question: Patron.java: [YOU NEED TO CODE] The Patron constructor will be used to initialize all attributes of the Patron object. The adjustBalance will update the current
![Patron.java: [YOU NEED TO CODE] The Patron constructor will be used](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f5027e8478b_98966f5027ddde4d.jpg)
Patron.java: [YOU NEED TO CODE]
The Patron constructor will be used to initialize all attributes of the Patron object.
The adjustBalance will update the current balance of the patron. For example if the current balance of a Patron is 2.0 and the amount is 4.5, this method should assign 6.50 to this.balance and return 6.50.
The equals method checks whether two patrons have the same id number. If the given object is a Patron, compare this.idNumber with the other patron's idNumber. If the given object is an Integer, compare this.idNumber with the Integer.
The toString method should return a String representation of the Patron. If a patron is initialized with the following parameters ("bob", "eee", 2, 5.5), it should return a String exactly as follows: "Name: bob, Email: eee, ID: 2, Balance: $5.50."
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
