I am messing with C# at the moment, I am after creating an account class which has a balance and an account holder. It also has methods to lodge, withdraw, getbalance, and getholdersName.
In the constructor section I have Account() and Account(string name, double balance) which should allow me to create a blank account or an account with existing data.
I have also set the lodge and withdraw method to be overrideable. I then created a class called AdvancedAccount that inherits from Account, that has a method that overrides the account.lodge method.
Everything works correctly from the main class if I go AdvancedAccount a = new AdvancedAccount();
I cannot however seem to create an account with which I can pass in the holders name and balance.
Any suggestions?
Mike55.
In the constructor section I have Account() and Account(string name, double balance) which should allow me to create a blank account or an account with existing data.
I have also set the lodge and withdraw method to be overrideable. I then created a class called AdvancedAccount that inherits from Account, that has a method that overrides the account.lodge method.
Everything works correctly from the main class if I go AdvancedAccount a = new AdvancedAccount();
I cannot however seem to create an account with which I can pass in the holders name and balance.
Any suggestions?
Mike55.