|
You were right to feel weird, that isn't proper OOP design. You wouldn't have all those functions be in the same class, classes are objects so you would have a customer class, an invoice class, a stock class.
So the customer class would have all the data of a single customer. The invoice class would have all the data and functions for an invoice.
So then you would create a new instance of the invoice class, and give it an instance of the customer class and then add stock items to it. Then inside the invoice class is where you can do anything you need like totaling the price, calculating tax, etc.
Does that make sense? Some times it can be really helpful to draw the classes out so you can visualize them.
__________________
OracleGuy
|