Ants (Playful OOP)

Encapsulation, composition, methods

3h 25min

Task 2.1-2.6


Understanding the basic principles of object-oriented programming (60%)
Understanding the basics of algorithmisation (10%)
Understanding the syntax of the Java programming language (10%)
The ability of creating own programs with the use of OOP (20%)
Working with methods
Acquisition
1 Basic concepts

Method


10 min
Investigation
2 Identification of methods

15 min
Production
3 Task 2.1

Define getHeight method for Wall


15 min
Acquisition
4 Method parameters

10 min
Production
5 Task 2.2

Define method with parameter


15 min
Practice
6 Task 2.3

Repeat for class Tower


30 min
Composition of objects
Acquisition
1 Basic concepts

Composition of objects


30 min
Production
2 Task 2.4

Creating of class Player with attributes Wall and Tower


15 min
Production
3 Task 2.5

Creating instance of Wall and Tower in player constructor


15 min
Encapsulation
Acquisition
1 Basic concepts

Encapsulation of methods


30 min
Production
2 Task 2.6

Encapsulate methods of Wall and Tower 


20 min