8.3.0.10

D — GUI

Due Wednesday, 22 September 2021, 11:59pm

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

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 reads a JSON specification for a small graph from STDIN and pops up a window with a drawing of this graph for 3s. It then shuts down without printing anything to STDOUT.

The graph is specified as a single JSON Graph object as follows:

    { "nodes" : [Posn, ..., Posn],

      "size"  : SIZE }

    

    SIZE is an integer between 100 and 800, and

    Posn is a JSON array of two integers between 0 and SIZE (inclusive).

    

    INTERPRETATION A Posn denotes a point in a SIZE x SIZE grid.

Your program renders each Posn as a small black dot on a SIZE by SIZE canvas of orange color and then draws red lines from every specified Posn to every other, distinct Posn.

You may assume that your program receives a well-formed and valid JSON object.

Evaluation The graders will run your program at the command line on several distinct inputs.

See Delivery for additional information on how to access a Linux desktop so that you can run GUI applications from there on your personal computer.