How to do the Counter

Descrição

GCSE Computer Science (Greenfoot) Slides sobre How to do the Counter, criado por Leann McLeod em 03-05-2016.
Leann McLeod
Slides por Leann McLeod, atualizado more than 1 year ago
Leann McLeod
Criado por Leann McLeod mais de 8 anos atrás
21
0

Resumo de Recurso

Slide 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.

Slide 2

    Code for the World (At the top)
    Rubrica: : 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

Slide 3

Slide 4

Slide 5

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

Slide 6

    Rubrica: : 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

Slide 7

    IN THE WORLD
    Rubrica: : 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".

Slide 8

    IN THE WORLD (contd.)
    Rubrica: : 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.

Slide 9

    IN THE ACTOR
    Rubrica: : 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.

Slide 10

Semelhante

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