Classification of finitely generated modules for k[x,y]/(xy) and generalizations