If only member function clear of WindowMgr is a friend of Screen, there are some points need to note. Sequence is important. First, define the WindowMgr class in WindowMgr.h, which declares, but cannot define clear function. Screen must be declared b…