Next two solution with read and write classes