Im having trouble with the textbook examples where everything that is a Class has to be a physical object and/or a Noun.
It is obvious that "Customer", "Product" and "Order" are good candidate classes, however, life isnt that contrived?!
I am trying to build my first e-commerce site, and am struggling taking all of my screen sketches, use-cases, and database design and converting things into OO Classes.
Below are some "activities" that I feel would make good candidate Classes:
- Register/Registration
- Log-In/Authentication
- Checkout
- Return Product
- Shop/Shopping
This list may seem like actions (i.e. "verbs"), but depending on how they are worded, they can be changed to "nouns".
And regardless of the "part of speech" they are, I feel they could be classes since they could have both "Attributes" and "Methods".
If "Authenticate" was a class, it could have the following attributes (username, password, session_id) and the following methods (login, logout, etc.)
Hopefully someone can help me get beyond physical nouns like "Customer", because obviously there is a lot more to convert to classes than just that small subset of things.
Sincerely,
TomTees
Im having trouble with the textbook examples where everything that is a Class has to be a physical object and/or a Noun.
It is obvious that "Customer", "Product" and "Order" are good candidate classes, however, life isnt that contrived?!
I am trying to build my first e-commerce site, and am struggling taking all of my screen sketches, use-cases, and database design and converting things into OO Classes.
Below are some "activities" that I feel would make good candidate Classes:
- Register/Registration
- Log-In/Authentication
- Checkout
- Return Product
- Shop/Shopping
This list may seem like actions (i.e. "verbs"), but depending on how they are worded, they can be changed to "nouns".
And regardless of the "part of speech" they are, I feel they could be classes since they could have both "Attributes" and "Methods".
If "Authenticate" was a class, it could have the following attributes (username, password, session_id) and the following methods (login, logout, etc.)
Hopefully someone can help me get beyond physical nouns like "Customer", because obviously there is a lot more to convert to classes than just that small subset of things.
Sincerely,
TomTees
|
|
Search Webmaster Help and Solution
OOP and ActivitiesRelated ItemsQuery failed: connection to localhost:3354 failed (errno=111, msg=Connection refused). |
