Class assignment writing some common data structures