User class and possible sub-types

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…
class User{


class Visitor extends User{


class Customer extends User{

What makes sense from an application design standpoint?


Also, it might be worthwhile to read Fowler’s paper ‘Dealing with roles’:

It depends if visitors will have any “features.” For example, if visitors can maintain a shopping cart, then it would be wise to include them. But if they’re just there, then there is no need.