|
Ants (Playful OOP)
|
||||||||||||||||
|
The aim of the course is to learn the Light OOP concepts using the Greenfoot environment. The game Ants is used as a demonstration. |
||||||||||||||||
| Planned ECTS: 2 | ||||||||||||||||
| Number of learners: 5 | ||||||||||||||||
| Mode of delivery: Face to Face | ||||||||||||||||
| Status: Not started | ||||||||||||||||
| Course public access: Public | ||||||||||||||||
|
Contributors: Peter Sedlacek |
||||||||||||||||
| Course learning outcome | Level | Weight | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Understanding the basic principles of object-oriented programming | Understanding | 25 | ||||||||||||||
| Understanding the basics of algorithmisation | Understanding | 25 | ||||||||||||||
| Understanding the syntax of the Java programming language | Applying | 10 | ||||||||||||||
| Analysing program execution based on the source code | Analysing | 20 | ||||||||||||||
| The ability of creating own programs with the use of OOP | Creating | 20 | ||||||||||||||
| Total weight: 100 | ||||||||||||||||
| Topic / Unit name | Workload | Learning type | Mode of delivery | Groups | Collaboration | Feedback | Mandatory activity | Assessment | ||||||||
| Points | Type | Providers | ||||||||||||||
|
Greenfoot environment Understanding the syntax of the Java programming language (20%)) , The ability of creating own programs with the use of OOP (80%)) |
||||||||||||||||
| The Greenfoot environment | ||||||||||||||||
|
Creating a new project Ants project |
20 min | Practice | Onsite | Synchronous | Teacher present | No | No | No | No | No | ||||||
| Total unit workload | 0.33h | |||||||||||||||
|
Class definition, basic work with classes Understanding the basic principles of object-oriented programming (60%)) , Understanding the syntax of the Java programming language (20%)) , The ability of creating own programs with the use of OOP (20%)) |
||||||||||||||||
| Object and classes | ||||||||||||||||
|
Basic concepts Object |
10 min | Acquisition | Onsite | Synchronous | Teacher present | No | No | No | No | No | ||||||
|
Exercise Identification of objects and their properties |
20 min | Investigation | Onsite | Synchronous | Teacher present | No | Yes | Teacher | No | No | ||||||
|
Basic concepts Class, instance, inheritance |
15 min | Acquisition | Onsite | Synchronous | Teacher present | No | No | No | No | No | ||||||
| Total unit workload | 0.75h | |||||||||||||||
| Creating an instance of the world | ||||||||||||||||
|
Orientation in greenfoot World, Actor, MyWorld |
10 min | Practice | Onsite | Synchronous | Teacher present | No | No | Teacher | No | No | ||||||
|
Code observation Class constructor |
10 min | Discussion | Onsite | Synchronous | Teacher present | No | No | Teacher | No | No | ||||||
|
Prepare world Try to change world graphics, try to set parameters of world etc., instance world |
30 min | Practice | Onsite | Synchronous | Teacher present | No | No | Teacher | No | No | ||||||
| Total unit workload | 0.83h | |||||||||||||||
| Creating a class | ||||||||||||||||
|
Basic concepts Class, object identity, internal state |
25 min | Acquisition | Onsite | Synchronous | Teacher present | No | No | No | No | No | ||||||
|
Task 1.2 Create class Wall |
10 min | Production | Onsite | Synchronous | Teacher present | No | No | Teacher | No | No | ||||||
|
Task 1.3 Create class Tower |
15 min | Practice | Onsite | Synchronous | Teacher present | No | No | Teacher | No | No | ||||||
| Total unit workload | 0.83h | |||||||||||||||
| Defining class attributes/fields | ||||||||||||||||
|
Basic concepts Class properties, working with class state |
15 min | Acquisition | Onsite | Synchronous | Teacher present | No | No | No | No | No | ||||||
|
Task 1.4 Define height for wall |
10 min | Production | Onsite | Synchronous | Teacher present | No | No | Teacher | No | No | ||||||
|
Task 1.5 Assign value for wall height |
10 min | Production | Onsite | Synchronous | Teacher present | No | No | Teacher | No | No | ||||||
|
Task 1.6 Repeat for tower |
20 min | Practice | Onsite | Synchronous | Teacher present | No | No | Teacher | No | No | ||||||
| Total unit workload | 0.91h | |||||||||||||||
| Constructors | ||||||||||||||||
|
Basic concepts Object creation, constructors |
15 min | Acquisition | Onsite | Synchronous | Teacher present | No | No | No | No | No | ||||||
|
Task 1.7 Move tower height initialization to constructor |
10 min | Production | Onsite | Synchronous | Teacher present | No | No | Teacher | No | No | ||||||
|
Task 1.8 Repeat for Tower |
20 min | Practice | Onsite | Synchronous | Teacher present | No | No | Teacher | No | No | ||||||
| Total unit workload | 0.75h | |||||||||||||||
|
Encapsulation, composition, methods 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 | ||||||||||||||||
|
Basic concepts Method |
10 min | Acquisition | Onsite | Synchronous | Teacher present | No | No | No | No | No | ||||||
|
Identification of methods |
15 min | Investigation | Onsite | Synchronous | Teacher present | No | No | No | No | No | ||||||
|
Task 2.1 Define getHeight method for Wall |
15 min | Production | Onsite | Synchronous | Teacher present | No | No | No | No | No | ||||||
|
Method parameters |
10 min | Acquisition | Onsite | Synchronous | Teacher present | No | No | No | No | No | ||||||
|
Task 2.2 Define method with parameter |
15 min | Production | Onsite | Synchronous | Teacher present | No | No | Teacher | No | No | ||||||
|
Task 2.3 Repeat for class Tower |
30 min | Practice | Onsite | Synchronous | Teacher present | No | No | Teacher | No | No | ||||||
| Total unit workload | 1.58h | |||||||||||||||
| Composition of objects | ||||||||||||||||
|
Basic concepts Composition of objects |
30 min | Acquisition | Onsite | Synchronous | Teacher present | No | No | No | No | No | ||||||
|
Task 2.4 Creating of class Player with attributes Wall and Tower |
15 min | Production | Onsite | Synchronous | Teacher present | No | No | No | No | No | ||||||
|
Task 2.5 Creating instance of Wall and Tower in player constructor |
15 min | Production | Onsite | Synchronous | Teacher present | No | No | No | No | No | ||||||
| Total unit workload | 1h | |||||||||||||||
| Encapsulation | ||||||||||||||||
|
Basic concepts Encapsulation of methods |
30 min | Acquisition | Onsite | Synchronous | Teacher present | No | No | No | No | No | ||||||
|
Task 2.6 Encapsulate methods of Wall and Tower |
20 min | Production | Onsite | Synchronous | Teacher present | No | No | Teacher | No | No | ||||||
| Total unit workload | 0.83h | |||||||||||||||
|
Constructors, more complex method calls (working with graphic in Greenfoot) Understanding the basic principles of object-oriented programming (30%)) , Understanding the basics of algorithmisation (30%)) , Understanding the syntax of the Java programming language (20%)) , Analysing program execution based on the source code (10%)) , The ability of creating own programs with the use of OOP (10%)) |
||||||||||||||||
| Graphics in Greenfoot | ||||||||||||||||
|
Basic concepts constants in java |
10 min | Acquisition | Onsite | Synchronous | Teacher present | No | No | No | No | No | ||||||
|
Task 3.1 defining constants for size of Wall |
10 min | Production | Onsite | Synchronous | Teacher present | No | No | No | No | No | ||||||
|
Code execution and graphics in Greenfoot |
15 min | Acquisition | Onsite | Synchronous | Teacher present | No | No | No | No | No | ||||||
|
Task 3.2 Drawing of wall |
30 min | Production | Onsite | Synchronous | Teacher present | No | No | Teacher | No | No | ||||||
|
Task 3.3 Drawing of a Tower |
30 min | Practice | Onsite | Synchronous | Teacher present | No | No | Teacher | No | No | ||||||
|
Task 3.4 Defining another properties of Player |
30 min | Practice | Onsite | Synchronous | Teacher present | No | No | Teacher | No | No | ||||||
|
Task 3.5 Drawing Player |
40 min | Production | Onsite | Synchronous | Teacher present | No | No | Teacher | No | No | ||||||
| Total unit workload | 2.75h | |||||||||||||||
|
Branching, conditional execution Understanding the basic principles of object-oriented programming (10%)) , Understanding the basics of algorithmisation (50%)) , Understanding the syntax of the Java programming language (10%)) , Analysing program execution based on the source code (20%)) , The ability of creating own programs with the use of OOP (10%)) |
||||||||||||||||
| Branching | ||||||||||||||||
|
Basic concepts branching |
15 min | Acquisition | Onsite | Synchronous | Teacher present | No | No | No | No | No | ||||||
|
Task 4.1 Creating object Game |
10 min | Production | Onsite | Synchronous | Teacher present | No | No | Teacher | No | No | ||||||
|
Task 4.2 Branching, conditioning execution of code – players drawning to corresponding sides of game plan |
30 min | Production | Onsite | Synchronous | Teacher present | No | No | Teacher | No | No | ||||||
|
Task 4.3 Adding instances to world, defining initial draw |
20 min | Production | Onsite | Synchronous | Teacher present | No | No | Teacher | No | No | ||||||
|
Task 4.3 Adding instances to world - Wall and Tower |
40 min | Practice | Onsite | Synchronous | Teacher present | No | No | Teacher | No | No | ||||||
|
Task 4.5 Conditioning execution code only one time |
25 min | Production | Onsite | Synchronous | Teacher present | No | No | Teacher | No | No | ||||||
| Total unit workload | 2.33h | |||||||||||||||
|
Algorithm, enumerations, arrays Understanding the basic principles of object-oriented programming (30%)) , Understanding the basics of algorithmisation (30%)) , Understanding the syntax of the Java programming language (10%)) , Analysing program execution based on the source code (20%)) , The ability of creating own programs with the use of OOP (10%)) |
||||||||||||||||
| Enums | ||||||||||||||||
|
Basic concepts Enums |
20 min | Acquisition | Onsite | Synchronous | Teacher present | No | No | No | No | No | ||||||
|
Task 5.1 Implementing card class |
30 min | Practice | Onsite | Synchronous | Teacher present | No | No | Teacher | No | No | ||||||
|
Task 5.2 Defining CardType enum |
20 min | Production | Onsite | Synchronous | Teacher present | No | No | Teacher | No | No | ||||||
| Total unit workload | 1.16h | |||||||||||||||
| Switch, array | ||||||||||||||||
|
Basic concepts Switch |
15 min | Acquisition | Onsite | Synchronous | Teacher present | No | No | No | No | No | ||||||
|
Task 5.3 Drawing of a card |
40 min | Production | Onsite | Synchronous | Teacher present | No | No | Teacher | No | No | ||||||
|
Basic concepts array |
15 min | Acquisition | Onsite | Synchronous | Teacher present | No | No | No | No | No | ||||||
|
Task 5.4 Implementing card array in game |
15 min | Production | Onsite | Synchronous | Teacher present | No | No | Teacher | No | No | ||||||
| Total unit workload | 1.41h | |||||||||||||||
| Advanced concepts - factory | ||||||||||||||||
|
Card instantiating |
30 min | Discussion | Onsite | Synchronous | Teacher present | No | No | Teacher | No | No | ||||||
|
Task 5.5 Implementing card factory |
30 min | Production | Onsite | Synchronous | Teacher present | No | No | Teacher | No | No | ||||||
|
Instantiating of Cards - cloning |
30 min | Discussion | Onsite | Synchronous | Teacher present | No | No | Teacher | No | No | ||||||
|
Task 5.6 Implementing clone method in card and random card instantiating in card factory |
20 min | Production | Onsite | Synchronous | Teacher present | No | No | Teacher | No | No | ||||||
|
Task 5.7 Implementing cards in Game, iterating over array |
60 min | Production | Onsite | Synchronous | Teacher present | No | No | Teacher | No | No | ||||||
|
Task 5.8 Implementing drawing of a card in Game |
40 min | Practice | Onsite | Synchronous | Teacher present | No | No | Teacher | No | No | ||||||
| Total unit workload | 3.5h | |||||||||||||||
|
Handling user input, Game logic Understanding the basic principles of object-oriented programming (10%)) , Understanding the basics of algorithmisation (20%)) , Understanding the syntax of the Java programming language (30%)) , Analysing program execution based on the source code (30%)) , The ability of creating own programs with the use of OOP (10%)) |
||||||||||||||||
| User input | ||||||||||||||||
|
Basic concepts User input - Greenfoot.ask |
30 min | Acquisition | Onsite | Synchronous | Teacher present | No | No | No | No | No | ||||||
|
Task 6.1 Input names from user |
20 min | Production | Onsite | Synchronous | Teacher present | No | No | Teacher | No | No | ||||||
| Total unit workload | 0.83h | |||||||||||||||
| Singletone | ||||||||||||||||
|
Basic concepts Singletone |
20 min | Acquisition | Onsite | Synchronous | Teacher present | No | No | No | No | No | ||||||
|
Task 6.2 Implementing game as a singletone |
10 min | Production | Onsite | Synchronous | Teacher present | No | No | Teacher | No | No | ||||||
| Total unit workload | 0.5h | |||||||||||||||
| Handle clicking | ||||||||||||||||
|
Task 6.3 Implementing clicking on a cards |
15 min | Production | Onsite | Synchronous | Teacher present | No | No | Teacher | No | No | ||||||
|
Task 6.4 Implementing getters of Card and Player |
25 min | Practice | Onsite | Synchronous | Teacher present | No | No | Teacher | No | No | ||||||
|
Task 6.5 Implementing supporting method for Player and fix in World |
30 min | Production | Onsite | Synchronous | Teacher present | No | No | Teacher | No | No | ||||||
|
Task 6.6 Implementing game logic |
60 min | Production | Onsite | Synchronous | Teacher present | No | No | Teacher | No | No | ||||||
| Total unit workload | 2.16h | |||||||||||||||
| Total course workload | 22.5h | |||||||||||||||