Joomla Vorlagen by Website Hosting

PL1 - projects

Choose one of the listed topics, which is free in your exercise. The themes are inspired by games on 8-bit computers from the 1980s. After selecting a topic, report it to your instructor and when you assign it to you, you can start working on it. You can also suggest another topic for project - e.g. implementation of some simple game.

Principles for implementation (mandatory):

  • follow the Java code conventions (revised version - https: // www / Java-Coding-Style-by-Achut-Reddy ), you can use workspace settings ( workspace ), which has automatic formatting set;
  • static methods and variables will NOT be used except for auxiliary functions and constants - consult their usage with a tutor;
  • the project will include an usage of interfaces, collections and work with I/O "streams".
  • objects will be handled through the most general type / interface, not through a particular class;
  • elaborate the project in extent and quality with regard to your capabilities - important is code quality or functionality not 100% perfection and conformity with the original;

Terms of submission

Form of submission is in LMS - -  the topic "Semestral project". The project will be submitted as a single zip file named pj1_2019_ep_<author_login>.zip (e.g.

, which will contain a directory named pj1_2019_ep_<author_login> (e.g. pj1_2019_ep_koz01). This directory will contain the eclipse project, which will will have a name after import pj1_2019_ep_<author_login>(e.g. pj1_2019_ep_koz01). Under this name, the project must appear when is imported into eclipse.

Failure to comply with the prescribed submission form will likely result in projects being excluded from processing as the processing process is partially automated.

The libraries used in the development will be part of the submitted project and it will not require any additional settings. A maven using for dependecy management is welcome. Failure to comply with this rule will be penalized by a certain number of points according to the time it takes to operate.

The deadline is specified in the LMS for this assignment (only applies to students attending my class). Later projects will be penalized with 20% of the total points earned for each week of delay. In exceptional cases, the project will be evaluated by full score in case of deadline submission - if it is extremely successful or the author has a demonstrable reason for late submission (this reason must be consulted in advance). Projects will be accepted until 31 December 2019 inclusive and after this deadline no project will be accepted.

PL1 - 3rd laboratory

Introduction contains a skeleton of a simple simulation of something like a catapult: a ball is accelerated by a constant force and then it is running on ballistic trajectory as it is influenced by gravity force.


Separate project into packages:

  • pl1.common - classes that contains common used routines;
  • pl1.lab03 - classes that start application;
  • pl1.lab03.core -  classes implementing simulation.

Using libraries

Implement methods in the class Ball: move, accelerate.

Implement method in the class Catapult shootBall and in the class Physics manageBallMovement.


pl1 03



 Modify simulation:

  • When a ball hits left or right wall then it bounces according to the Law of Reflection.
  • Create some object (tree, house or whatever) on the random position at the bottom and blink with a canvas when a ball hits the object.

PL1 - 1th laboratory


The aim of the exercise is to make students familiar with the basics of Java technology and programming.


  1. Introduction to the basic structure of Java technology - JRE → JDK
    to explain the term JRE, JDK - what I need for development, what for running
  2. Introduction to the basic structure of Java program

    1. show source file - .java extension,

    2. show the compilation (from the console) and what it will create

    3. running Java program (from console)

  3. Introduction to the selected IDE - depends on the choice of the teacher. Students can use others because the following are installed:

        • eclipse

        • netbeans

        • InteliJ

    1. show startup, workspace, new project, new class.

    2. project structure

    3. import projects into workspace.

  4. Object creation – Rectangle, Triangle, Eclipse, Arc. Object manipulation.

  5. Show possibility to start program in IDE, debuging, stop on specific line,  steps.

  6. local variable, block of code


Home work

Create program that create two figures as is: house, car, tree, piggy, mountain, sun, pacman….

Create it individually. Team work will be assessed summary and distributed among members.

PL1 - 2nd laboratory


Students will learn how to create a class, a constructor, an instance variable and they also understand an object  composition(compose one object from one or more others).


Download and open project -

Create a new class  „House.“

Create a non-parametric constructor of House to create a green roof consisting of a triangle (a Triangle object) and gray masonry (a Rectangle object).

Create the moveRight and moveDown methods to cause the house to move a certain number of pixels in the direction you want. Number of pixels will be parameter.

Create the getX and getY methods to return the house position.

Create a setPosition method.

Create a parametric constructor of House that allows to define initial position.

Create instance of a House when an user do double-click to the canvas(method handleMouseClick is called in that case).

Move a last create instance of House with buttons (handleButtonXXX).

Make sure that the house is not placed in a position outside the canvas range - use operator modulo


Work on assigned individual tasks. These are "TODO" 1-6, which are like comments in the Pacman class. Easy to view is in eclipse - "Window / Show View / Tasks".

UML diagrams

Overview of a class House

pl1 02 01


Event handling

pj2 02 02