How to do the Counter

Descripción

GCSE (Greenfoot) Computer Science Diapositivas sobre How to do the Counter, creado por Leann McLeod el 03/05/2016.
Leann McLeod
Diapositivas por Leann McLeod, actualizado hace más de 1 año
Leann McLeod
Creado por Leann McLeod hace más de 8 años
21
0

Resumen del Recurso

Diapositiva 1

    How to code for the Counter
    World Actor
    We are going to use the example of the a ship and Iceberg in the Ocean world.

Diapositiva 2

    Code for the World (At the top)
    Pie de foto: : This blue box is adding the counter to the world. Therefore with this reference, the world can link with the actor and the counter. BEWARE NO BRACKETS

Diapositiva 3

Diapositiva 4

Diapositiva 5

    Version 2 - Different GREENFOOT
    This Greenfoot is for the Newer version.

Diapositiva 6

    Pie de foto: : This is a key concept when programming Greenfoot. This is that the various Actors and the World - using references - can communicate or talk to each other. They cannot communicate without references.
    Key Concept

Diapositiva 7

    IN THE WORLD
    Pie de foto: : This is to go in the prepare section in the World. This is adding the Counter object - manually - into the world. This can be done automatically by dragging the counter where you want it and pressing "Save the World".

Diapositiva 8

    IN THE WORLD (contd.)
    Pie de foto: : If you could please pay attention to the purple box. The reason the word "counter" is placed in the brackets for when the Turtle is being created is that when that is done, a reference for the counter to the turtle is being created. Now the turtle will know and recognize the counter, therefore it can tell the counter to update a score if needed, when the parameter is updated on to its own class area for coding and programming.

Diapositiva 9

    IN THE ACTOR
    Pie de foto: : This makes the final reference to the Counter. The blue box is focusing on the code while the pink box is focusing on the position of the code. It is before the "act" function.

Diapositiva 10

Mostrar resumen completo Ocultar resumen completo

Similar

Computing Hardware - CPU and Memory
ollietablet123
SFDC App Builder 2
Parker Webb-Mitchell
Data Types
Jacob Sedore
Intake7 BIM L1
Stanley Chia
Software Processes
Nurul Aiman Abdu
Design Patterns
Erica Solum
CCNA Answers – CCNA Exam
Abdul Demir
Abstraction
Shannon Anderson-Rush
Spyware
Sam2
HTTPS explained with Carrier Pigeons
Shannon Anderson-Rush
Data Analytics
anelvr