Lesson 7

Project I

Your task is to create a desktop application, that combines 2 parts:

Painting module

Module consists of main window, which generates primitive shaped elements (ellipses, rectangles, triangles, etc.) with different colors, locations and dimensions.

At constant intervals, there is a new element added (drawn), which values are pseudorandom. The element has to have a proper location and dimension, so it fits in the window.

Resizing a window is followed by rescaling all drawn elements.

Program has to save information about generated shapes to a file.

Displaying module

It consists of a window, which reads information about shapes from a file and draws them in the window. Generated image has to be the same as the one generated by painting module.

Resizing a window is followed by rescaling all drawn elements.

Additional description

Modules are understood as two parts of an application. It does not implicate necessity of using modules or packages available by Java language.

Format of a saved file is determined by a student. One cannot use “Object Streams” classes.


Project grade consists of:

  • Compilation (no compilation means 0 points)
  • Clean code
  • Responsive application
  • Quality of used mechanisms for working with a file
  • Solving a problem of multithreading
  • Answering questions while defending a project
  • Ability to modify a code while defending a project
  • Variety of shapes (min. 3 different shapes)
  • Punctuality with submitting the project (submitting on Lesson 8. reduces max grade to 60%)