Tower defense (OOP4Fun Book)

1. Class definition

3h 50min
  • TS 1.1. Exploring Classes and Objects through Game Development with Greenfoot
  • TS 1.2. Creating Classes and Objects through Game Development with Greenfoot

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%)
TS 1.1: Exploring Classes and Objects through Game Development with Greenfoot

Learning objectives:

By the end of this session, students will be able to understand basic concept of the object and class. Understanding of the examined concepts will be discussed in the context of the game development, encouraging creativity, teamwork, and an enthusiastic approach to coding with theGreenfoot tool. 

Target audience:

Secondary school students attending the OOP4Fun course. Basic programming knowledge including object and class. 

Materials & resources:

Greenfoot webpage and download instructions.  
Examples prepared by the teacher. 
Internet resources for identification of other examples. 

Assessment:

Gamification represents non-formal assessment but will increase the interest, intrinsic motivation and learning outputs of the whole group. 

Result dissemination:

To disseminate their results to teachers and fellow students the usual setup of Github/Gitlab and Learning management system (e.g. Moodle will be used). The students can continue the discussion on the topic on the forum provided to them via the Learning management tool. 


Usvajanje
1 Object

 Introduce the students with the object concept by real-life examples.


10 min
Istraživanje
2 Identification of objects and their properties

Students conduct independent research on what objects are to be presented on the stage of the game they are developing (Flipped Classroom Session).


15 min
Usvajanje
3 Class, instance, inheritance

Teacher guided discussion on recognized objects and their classification in classes.


15 min
Vježbanje
4 Orientation in Greenfoot: World, Actor, MyWorld

Creating an instance of the world in Greenfoot


10 min
Diskusija
5 Class constructor

The teacher presents source code and introduce the concept constructor.


10 min
Vježbanje
6 Task 1.2

Prepare world


15 min
Vježbanje
7 Image settings

How to choose, create, import, paste an image


10 min
Kreacija
8 Task 1.3

Prepare world graphics


15 min
TS 1.2. Creating Classes and Objects through Game Development with Greenfoot

Learning objectives:

By the end of this session, students will understand basic concepts of the object, class, class properties and methods. 

Target audience:

Secondary school students attending the OOP4Fun course. Basic programming knowledge including object, class, class properties and methods. 

Materials & resources:

Greenfoot webpage and download instructions.  
Examples prepared by the teacher. 
Internet resources for identification of other examples. 

Assessment:

Gamification represents non-formal assessment but will increase the interest, intrinsic motivation and learning outputs of the whole group. 

Result dissemination:

To disseminate their results to teachers and fellow students the usual setup of Github/Gitlab and Learning management system (e.g. Moodle will be used). The students can continue the discussion on the topic on the forum provided to them via the Learning management tool. 


Usvajanje
1 Basic concepts

Subclass, object identity, internal state


25 min
Kreacija
2 Task 1.4

Create class Enemy


10 min
Vježbanje
3 Task 1.5

Create instance of class Enemy


30 min
Usvajanje
4 Interface of object

5 min
Usvajanje
5 Message and method

15 min
Usvajanje
6 Task 1.6

Send messages to instance


30 min
Usvajanje
7 Theory revision

Theory revision of the object, class, instance, internal state, identity, message, method


15 min