I asked a previous question in regards to class design. Jim, if you are reading this, you know which one.
I am planning out an application to create invoices and will have two classes, invoice and invoiceline.
Invoiceline will read the entries from the database.
qty desc rate total
1 code change 35 35
2 more code changes 35 70
My questions is in regards to the calculating the total, how should this be handled?
1. Have a method that executes a sproce and returns the total?
2. Loop over the line items when the data is being read from the database?
Would total be a property of the invoice class?