8.7

D — GUI

Due Monday, September 26, 9:59:59pm Monday, October 3, 9:59:59pm

Purpose to explore the GUI libraries of the chosen programming language; to deliver software as specified; to explore further system configurations

Delivery You must deliver xgui in a directory called D in your repository.

All auxiliary files must be put into a sub-directory called Other.

Task Develop xgui, a program that pops up a window and draws a hexagon into the window. The size of the hexagon (in pixels) is specified as the sole command-line argument.

If size is the command-line argument, the hexagon looks as follows, including its dimensions:

image

Your program pops up a window and draws the hexagon of the appropriate size into the window. It closes the window and shuts down when a "user" clicks inside the hexagon.

Evaluation I will run your program at the command line with various arguments, like this:

    $ ./xgui 40

    ... some window pops up ...

    $ ./xgui -1

    usage: ./xgui positive-integer

    $ ./xgui 99

    ... some window pops up ...

See Delivery for a reminder on how to access our linux server. You may also need to familiarize yourself with X forwarding so that you can run GUI applications from there on your personal computer.