Hello Everyone.
I am refreshing my Java programing as I took a course back to 2007. So, I started from scratch. There is a project and I got stack in one statement. "The getAccount method returns the reference to the Account object. return account"
This is a fragment of the Customer class
Customer Class
-accounts : Account = new Account()
-city = String
-address = String
-firstName = String
-lastName = String
-
-
------------------------
-getAddress(): String
-getAccount(): Account
-
-
So, I was doing my programing until I got the getAccount
I have another class called Account
public class Account { char acctType; double balance; String acctId; public void setBalance(double amount) { balance = amount; // assigns the value of amount to the object attribute balance. } public void setId(String id) { acctId = id; } public void setAcctType(char type) { acctType = type; } public String getID() { return acctId; // note the use of the return keyword to return a value } public char getAcctType() { return acctType; } public double getBalance() { return balance; } }
On top of that, how I set up the setAccount according to this statement
The setAccount method receives a reference to an Account object. Assign this to the account field of the object: account = acct.
I appreciated if someone there would like to give me a help with that getAccount method in the Customer Class Please. Thank you
Hector