Given a square in the middle of the graphics window with these coordinates: (-1,1) (1,1) ------- | | | | | | ------- (-1,-1) (1,-1) write code that asks the user to click anywhere on the window. If they click outside the square, draw the Point where they clicked. If they clicked inside the square, output "All Done" at the top of the window. Solution: Point click = cwin.get_mouse("Click anywhere"); if (click.get_x() < 1 && click.get_x() > -1 && click.get_y() < 1 && click.get_y() > -1) { cwin << Message(Point(-9,9), "All Done"); } else { cwin << click; } Bonus (double points if correct): What is the value of the following expressions? Lec 001 (2-3pm): 1) 10 < 20 || 5 + 3 * 2 != 4 + 7 && !(10 > 5) solution: 10 < 20 || 5 + 3 * 2 != 4 + 7 && !(true) 10 < 20 || 5 + 3 * 2 != 4 + 7 && false 10 < 20 || 11 != 11 && false true || false && false true || false Answer: true 2) (10 < 20 || 5 + 3 * 2 != 4 + 7) && !(10 > 5) solution: (10 < 20 || 11 != 11 ) && !(10 > 5) ( true || false ) && !(10 > 5) true && !(10 > 5) true && !(true) true && false Answer: false Lec 002 (4-5pm): 1) 10 < 20 && 5 + 3 * 2 != 4 + 7 || !(10 > 5) solution: 10 < 20 && 5 + 3 * 2 != 4 + 7 || !(true) 10 < 20 && 5 + 3 * 2 != 4 + 7 || false 10 < 20 && 11 != 11 || false true && false || false false || false Answer: false 2) 10 < 20 || 5 + 3 * 2 != 4 + 7 && !(10 > 5) solution: 10 < 20 || 5 + 3 * 2 != 4 + 7 && !(true) 10 < 20 || 5 + 3 * 2 != 4 + 7 && false 10 < 20 || 11 != 11 && false true || false && false true || false Answer: true