0%
Introduction to OOP — Chapter 08

Chapter 08 — Introduction to OOP

Part 1A — Learning Dart · Chapter 08 of 62 · 6 h

Chapter 08 — Introduction to OOP

Level: beginner Estimated time: 6 h Prerequisites: Chapter 07 — Functions What you will be able to do by the end: write your own classes, create objects from those classes, read and modify their properties, call their methods, and make multiple objects interact with each other.


08.0 — Chapter Objectives

By the end of this chapter, you will be able to:

  • explain why standalone variables and functions are no longer enough;
  • define what a class is;
  • define what an object is;
  • explain the word "instance";
  • declare a property (also called an attribute);
  • declare a method;
  • write your first class;
  • instantiate an object;
  • read the value of a property;
  • modify the value of a property;
  • call a method on an object;
  • understand and use the this keyword;
  • create multiple objects from the same class;
  • store objects in a List;
  • write a method that returns a value;
  • write a method that accepts parameters;
  • write a complete Player class;
  • write a complete Enemy class;
  • write a Product class outside the context of the game;
  • make two objects interact;
  • explain why a class is preferable to a Map.

Comments

Comments are powered by GitHub Discussions

Sign in with GitHub to join the discussion

Link copied!