CSSE 120 -- Intro. to Software Development

Homework 16

Due at the beginning of Session 17.

  1. Complete the assigned reading for the next session: Zelle Sections 12.1–12.2.
  2. Complete the Angel quiz over the reading assignment. You'll find the quiz on the course Angel page, under Lessons → Homework → Homework 16 → Object-Oriented Design.
  3. For the Quixo project you will be rotating blocks, which might be stored as a list of lists of blocks.  This exercise will help to prepare you for your project by exposing you to rotating rows and columns in a lists-of-lists.

    1. You will continue to work with the module listRotation.py in project ExploringLists.  Complete the in-class exercises first if you are still working on them.  Make sure your name is included in the initial comments. Once you are sure that this part works, commit your work to your repository.
    2. Implement and test the rotateFromTop() function; test it by uncommenting (<Ctrl> +  \  key combination will get that done in Eclipse) the appropriate lines in the main() function.  Once you are certain that your implementation works, commit your work to your repository.
    3. Implement and test the rotateFromBottom() function; test it by uncommenting the appropriate lines in the main() function. You might want to comment (<Ctrl> + / key combination will get that done in Ellipse) the lines in main() that you no longer need.  Once you are certain that your implementation works, commit your work to your repository.
    4. The last part of this exercise is to implement the rotateAnyColumn() function.  Implement and test this function in a similar fashion to how you did the previous functions. 
    5. Uncomment all the lines in the main() function.  Ensure that all your functions work correctly. Commit the final version of your code to your repository.
  4. Finding the circle with the smallest radius that encloses a set of points.

    1. Checkout the code for this assignment from the ExploringLists project. Be sure to checkout the Button.py and enclosingCircle.py modules. The ONLY module you will be modifying is enclosingCircle.
    2. Modify function collectPoints() so that it adds the clicked point to the list of points and displays the clicked point.  The point, p, should be displayed as a circle centered at p with a radius of 10 pixels.  Delete the print statement in that function. Once you are certain that your implementation works, commit your work to your repository.
    3. Implement and test the function smallestEnclosingCircle().  You might wish to consider using function(s) from the listDemos.py module in this project. The debugger in Eclipse might be your friend for this part.  Once you believe that your implementation works, commit your work to your repository.
    4. You are now ready to draw the smallest enclosing circle for a list of points.  Implement and test the drawEnclosingCircle() function.  Modify function collectPoints() so that it invokes this function to draw the enclosing circle.  Display the center point of the enclosing circle so that its color is different from the color of the display of the other points.
    5. Commit the final version of your code to your repository
  5. QUIXO: Quixo is a wooden game that's fun to play.  For your group project you are going to implement this game.  Here are the rules on how to play the game.