CSCI 1320 (Principles of Computer Science I), Fall 2014:
Homework 8

Credit:
10 points.

Reading

Be sure you have read (or at least skimmed) chapters 11 and 12.

Programming Problems

Do the following programming problems. You will end up with at least one code file per problem. Submit your program source (and any other needed files) by sending mail to bmassing@cs.trinity.edu, with each file as an attachment. Please use a subject line that mentions the course and the assignment (e.g., ``csci 1320 homework 8'' or ``CS1 hw8''). You can develop your programs on any system that provides the needed functionality, but I will test them on one of the department's Linux machines, so you should probably make sure they work in that environment before turning them in.

  1. (10 points) Your mission for this problem is to write a Scala program that illustrates some basic GUI and graphics functionality. Specifically, the program should, at user request, draw a picture consisting of concentric ellipses of alternating contrasting colors (as shown in the sample screen shot in Figure 1 below). That is, initially the main display should be blank, and when the user requests a ``draw'' operation (using one of the options for user input described below), the program should draw something like the picture shown, and when the user requests a ``clear'' it should return to blank. The program should also provide a way for the user to exit it. Options for user input are the following: You will get full credit for implementing one of these choices, extra credit for each additional choice.

    Figure 1: Sample screen shot of program after ``draw'' has been selected.
    Image hw-sketch

    Hints:



Berna Massingill
2014-12-10