See my edit to my previous post.
You might find it better all round to use the Screen's public setPoint function, rather than mucking about making things friends. Then you just make Rectangle::draw something like:
void Rectangle::draw( Screen& object)//prints contents of rectangle on screen object
{
int x1=upLeft.getX();
int y1=upLeft.getY();
for(int i=x1;i<(x1+width);i++)
for(int j=y1;j<(y1+height);j++)
{
Point point(x1,y1);
object.setPoint(point, 'x');
}
} If you are doing this for a class, then I would imagine that is what they would want you to do.