I’m trying to plan out what classes I need for my e-commerce site. (I have not written OOP before.)
There will two types of users on the website: Visitors (unregistered) and Customers (registered).
I definitely need a “Customer” class, but I am unsure if I need to create a “Visitor” class to handle people who are just visiting/browsing?
If I need both, I was going to have…
[COLOR=“Blue”]
class User{
}
class Visitor extends User{
}
class Customer extends User{
}
[/COLOR]
What makes sense from an application design standpoint?
TomTees