The diagram has the four classes. The first class is person, which is the parent class of patient class. The patient class is connected with the Doctor class. The doctor class and admin class are linked with the admin class. The admin class is the class through which the patient and doctor classes are managed. All the classes have their data members and member functions.