So how does it work? Object oriented programming came about after the year of linar procedual programs that became large and full of events and behaviours that may/may not be triggered however these were required to be built in to the sytems. Over the decades OOP (object oriented programming) became more favoured and popular, this meant the large long continual pages of code and programming could be built in to small self containted objects that acted like mini programs. Each object could contain its own data and its own logic, and each object can communication between themselves. So each of these objects could represent elements of a system such as players, enimies, platforms, power-ups e.t.c.
So to understand what an object is you could think of everything that is tangable (something that can be seen, hear or touched), so this could be the desk that your sitting at, the monitor your using to read this text or the chocolate bar that you purchased from the shops this morning.
However objects can also be intangible things that exist but are not physical in nature these are things like, Bank accounts, Leaderboards, Open worlds, Players, Weapons, Power-ups. Therefore anything that "EXIST" can be an object.
Although that objects are vital in OOP the most important part to start with is that of the "Class".
The term class is stated as being .."The collection of Properties and Methods". These classes act like a template/stencil that are used to create an Object.
Object Oriented Design make use of images and diagrams to help present the concept of the program visually so that the programmer can create the code for the project.
The image below shows the typical layout of a class, however in this instance there are three classes, two of the classes (Child Class)"inherit" from the other (Parent Class), we will cover "Inheretance" later in these tutorials.
+-----------+ | ClassName | ← This is the title of the class +-----------+ | data1 | ← This is the data of the class, these can be, ID, DOB (date of birth), Address | data2 | +-----------+ | method1() | ← This is any methods that may be used, this could be having a bank account, | method2() | to enable the open, close of the account or deposit/withdrawal of cash. +-----------+
1.Now that you have some understanding to the use of classes carry out a decontructive analysis of Mario World level 1-1. (You may have access to the emulator of the game). Using the game first create a simple bulleted list of the attributes you can see in the game, then add further information once you have gathered the points that you think are there. You shoulf use the Class Diagram above as a guide, try and create a simple class diagram of the Mario game (Mario world 1-1). Think about all elements of the game. E.G Character (Hero, Enemy) You may use a tool to create this diagram, such as Visio
2. Now that you have looked over the game and have created a diagram, you are to create the story of the level using the information gained from the level demonstration by your tutor. This narative/story will enable you to review the NOUNS in the narative and to ensure that your orriginal diagram has the correct classes.
3.Fill in the Gaps!
Links to Learning Outcomes |
Links to Assessment criteria |
|
---|---|---|
Anonymous Assessment - Learners assess an anonymous piece of work containing deliberate mistakes against given success criteria.