You are 'overwriting' because your Patient class has all static variables, so every time you set one it appears they all change (when in fact there is only one of each). These should be instance...