← University

Programozási technológia

Programming Technology

The first third of the semester is a recap of object-oriented Java; the other two thirds are about writing GUI programs – board games, then animated sprite games with a database behind them.

Each session below explains the ideas with diagrams and short code fragments and shows how they apply to the three assignments. The complete example programs are discussed in class; here the point is to understand why they are built the way they are.

JavaOOPSwingMVCJDBCUnit testing

Requirements

What it takes to complete the practice part. Dates and deadlines are on Canvas.

Lecture quizzes

At least 75% of the quizzes at 100%

The lectures are asynchronous and online. The quiz rule applies even if you are exempt from attending.

Practical sessions

Attendance is required

The sessions are where the examples are built and the assignments are presented.

Assignments

Three assignments, each worth at least 2 points

Presented in person by the deadline. A presentation can be up to three weeks late, at −1 point per week.

Computer lab test

A practical test at the end of the semester

It has to be passed, and it counts with double weight in the final grade.

Final grade

Average of the assignments and the lab test (×2)

The average is rounded down if it is below 3.5.

Sessions

Open a session here, or on its own page in a new tab.

  • Session 1

    Recap: classes, objects and a first window

    What the semester builds towards, how a Java project is laid out, and the object-oriented basics underneath everything: private state, references and parameter passing, a class around a list, and a first Swing calculator with a listener that validates its input.

  • Session 2

    UML relationships: association, aggregation, composition, inheritance

    The line ends of a UML class diagram and the Java each one means, read on a zoo and designed on a role-playing game where subclasses override one damage rule – and why that rule is better abstract than defaulted.

  • Session 3

    Java collections and generics

    A bag (multiset) built twice – on an ArrayList and on a HashMap – to show how to choose a collection, why equals and hashCode matter, and how to read generic signatures, sort with a Comparator and use views like subList.

  • Session 4

    Reading files and handling exceptions

    Turning a text file into objects line by line, and handling every way it can be wrong: checked and unchecked exceptions, your own exception with the line number, try-with-resources – and how a complete first assignment is structured.

  • Session 5

    GUI programming with Swing

    Swing from the ground up: a window as a tree of panels, layout managers, listeners in four forms and the Event Dispatch Thread – then the calculator and an on-screen keyboard split into a Swing-free model and a view, and the same calculator in MVC.

  • Session 6

    Separating the model from the view

    A working flashcard trainer with everything in one Swing class is split, step by step, into a model with no Swing in it and a view that only forwards events and redraws itself with one refresh() – then the model gets JUnit tests.

  • Session 7

    Board games: update only what changed

    A Color clicker that redraws every button after each click becomes an MV program whose model returns the changed positions, so the view refreshes five buttons instead of n². Then a walk through the sample solution of the second assignment, and the shared requirements and tips for every task.

  • Session 8

    Graphics, animation and a first database

    Drawing on a panel with paintComponent and animating it with one Swing Timer that steps a Swing-free model; then a first database – JDBC with PreparedStatement, SQLite by default or MySQL in Docker, and a UI → backend → repository split that tests without a database.

  • Session 9

    A database in the game: leaderboard, SQL injection, keyboard and sprites

    A Swing game gets a leaderboard: the view talks only to the backend, the backend stores through a repository interface, and the game survives a missing database. Plus SQL injection vs prepared statements, key bindings, time in ticks and the shared rules of the third assignment.

  • Session 10

    Sprite games with images and level files

    Arkanoid shows three techniques for the third assignment – sprites from images, key bindings and levels from text files – and the Diver sample shows where they belong: a Swing-free model, levels in resources checked by a playability test, patrolling enemies on a Timer, and a checklist for submitting.