how to write this class?

Printable View