Year 11

Creating a class

Year 11

Creating a class

warning

These resources will be removed by end of Summer Term 2025.

Switch to our new teaching resources now - designed by teachers and leading subject experts, and tested in classrooms.

Lesson details

Key learning points

  1. In this lesson, we will use our experience with object-oriented programming to step into the shoes of a video game programmer. We will create a class that will hold the information about monsters in a puzzle game.

Licence

This content is made available by Oak National Academy Limited and its partners and licensed under Oak’s terms & conditions (Collection 1), except where otherwise stated.

Loading...

5 Questions

Q1.
The associated actions of an object
Attribute
Class
Instance
Correct answer: Method
Q2.
Every new object created from the same blueprint
Attribute
Class
Correct answer: Instance
Method
Q3.
A collection of data and its associated actions
Class
Instance
Method
Correct answer: Object
Q4.
The individual properties of an object
Correct answer: Attributes
Class
Method
Object
Q5.
The blueprint for an object
Attribute
Correct answer: Class
Instance
Object

4 Questions

Q1.
In this piece of code, zombie is a...
An image in a quiz
Attribute
Class
Method
Correct answer: Object
Q2.
When you create a new object from a class you need to use a...
Attribute
Correct answer: Constructor
Getter
Method
Q3.
To access the name of the Monster in this code which line in correct?
An image in a quiz
Correct answer: print(zombie.getName())
print(zombie.name)
Q4.
An object is a structure that contains...
A whole program
Data
Correct answer: Data and methods
Methods