Sun. Jan 22nd, 2023

Object Oriented Design (Pacman project)

Introduction

In this unit of work you will be investigating the way in which Object Oriented principles can be applied to the design of a Pacman-style game. The key learning outcomes are:

An awareness of the meaning, rationale and uses of the following principles:

  • Classes
  • Methods, attributes and encapsulation
  • Inheritance
  • Overriding
  • Polymorphism
  • Streamlining design to minimise code redundancy

Part 1 (2 hours)

What parts of the game can be represented using classes, and in what circumstances will inheritance be advantageous?

How do you go about building logic that can be re-used?

Presentation: Pacman – Object Oriented, Pt 1
External resource: Introduction to OOP Concepts

Keywords: classes, inheritance

 

Part 2 (1 hour)

How do you adapt the plans into functional code? (C#)

Presentation: Pacman – Object Oriented, Pt 2
Pseudocode: Pseudocode 1
Starter code: GameCharacter classes
Assessment questions: Pacman Questions 1

Preparation for next lesson: Event driven programming in Windows Forms Applications (C#) (Linking back to Unit 1)

Keywords: classes, inheritance, overriding

 

Additional Resources

Here is a zip of the project folder for pacman; it includes the required images as well as basic code.