Before session 3
Objects. Classes.
Objectives:
After completing the session, a student can:
- explain terms: object, object class, client class, instance, constructor, encapsulation, accessor and mutator methods, modifiers, scope of variables and methods;
- create an object description in the object class;
- create instances in the client class;
- use various constructors and class variables;
- use modifiers;
- use keyword
this
; - create and use different types of arrays;
- explain differences between primitive and reference data types.
Topics
- 3.1 Introduction into object-oriented programming
- 3.2 Objects. Classes. Instances
- 3.3 Constructor
- 3.4 Methods
- 3.5 Encapsulation
- 3.6 An array of objects
- 3.7 Reference semantics
- 3.8 Tasks
NB! Watch the video in youtube if you need the subtitles!
Alternative materials
- in English: H. Schildt. Java - The Complete Reference: Chapter: 6
- in Estonian: here
- in Russian:
- Г. Шилдт. Java 8. Полное руководство: Chapter: 6
- Videos 12- 14