The final question: how are classes usually structured in applications?
I am currently writing a test banking application in asp.net For example: I have these two classes. One is an account, and the other is a utility class (it deals with accounts, that is, get accounts, update accounts, etc.).
public Account {
int ID;
string Name;
double Balance;
}
public Accounts {
public List<Account> GetAllAccounts();
public Account GetAccountByID(int AccountID);
}
in my view layer, when I want to get the account that I am using:
Account editAccount = new Accounts().GetAccountByID(234);
You can see that I am creating a new Accounts () class to get an account. What should I really do? Or is it right? Does the static class fit this need better?
I feel that it gets very clogged, and if it gets bigger, it might be uncontrollable with classes having similar names.
? ?
.