Bishopston Comprehensive School

Slides:



Advertisements
Similar presentations
Whats New in Office 2010?. Major Changes in Office 2010 The Office Ribbon, which first made its appearance in Office 2007, now appears in all Office 2010.
Advertisements

How to do a print screen!. 1. Find what you want to ‘copy’ as evidence:
CPIT 102 CPIT 102 CHAPTER 1 COLLABORATING on DOCUMENTS.
Asteroids Games and Simulations O-O Programming in Java The Walker School The Walker School – Games and Simulations
Wombats Creating Games with Greenfoot The Walker School – Games and Simulations
How to prepare a PowerPoint presentation
Fish Chomp. The screen where you can see what happens when you play your game is called the STAGE. The SCRIPT BANK is where the types of instructions.
Created by NW 2012 – please note all copyright on images used is property of copyright holder. Note: some of the more complicated descriptions are taken.
Greenfoot. Getting Started Open the Greenfoot download site: Select Greenfoot
Spreadsheets in Finance and Forecasting Presentation 9 Macros.
Chapter 1 - Getting to know Greenfoot
How to Make a Power Point Presentation What to Do First  Open the Microsoft PowerPoint program by double clicking on it.  Create a new presentation.
Greenfoot Game Programming Club.
Fish Chomp. The screen where you can see what happens when you play your game is called the STAGE. The SCRIPT BANK is where the types of instructions.
Lesson 1: Writing a program. Java Java is a programming language Computer cannot understand it, though it can be translated ( compiled ) so a computer.
How to make a digital portfolio SCC YEAR 1. Table of contents  1. Go to your digital portfolio  2. Make the document as your digital portfolio  3.
2D Design – A Guide! SECTION 1.
Introduction To Greenfoot
Ltz/ng/createAthShrRvw1 LiveText at CBU Electronic Portfolios! Create, edit, attach documents, and Share or Send for Review.
Perform a complete mail merge Lesson 14 By the end of this lesson you will be able to complete the following: Use the Mail Merge Wizard to perform a basic.
Index Background Costumes Making object walk smoothly Controlling an object with the keyboard Control an object with the mouse Changing costume when hit.
Chapter 11 Enhancing an Online Form and Using Macros Microsoft Word 2013.
Greenfoot.
Власенко Юлия Сергеевна, учитель математики МОУ ООШ №5 г. Качканар
Chapter 4 - Finishing the Crab Game
Training Guide for Faculty
Scratch Unit Overview We are going to look at computer programming and how to create your very own computer game The piece of software we will be using.
Blog and its Steps.
Eclipse Navigation & Usage.
T_C_N_L_G_ E D I D I E O Y O H I E B J I R E A A W.
Calculus Jeopardy Hosted by Bannon Welcome to Power Jeopardy
Training Guide for Faculty
Creating Games with Greenfoot
© Paradigm Publishing, Inc.
How to Make a Power Point
Version 2.
The Little Crab Scenario
Addendum: Due to the breakneck speed at which this game was created, there are an ENORMOUS number of “crackhead” errors. Find them for board trip credit!
Dance Cards Dance Cards
FAQ 02 How to upload completed Assessment Tasks to the website
How Our Courses Work To progress through this slide show, simply click your mouse or use your arrow keys next back.
Dance Cards Dance Cards
Dance Cards Dance Cards
Javascript Game Assessment
Calculus Jeopardy Hosted by Bannon Welcome to Power Jeopardy
Dance Cards Dance Cards
Dance Cards Dance Cards
Benchmark Series Microsoft Word 2016 Level 2
Go to =>
Mostly Solving Equations
This is a setup file for a Jeopardy game.
Dance Cards Dance Cards
Calculus Jeopardy Hosted by Bannon Welcome to Power Jeopardy
Dance Cards Dance Cards
This is a setup file for a Jeopardy game.
How to Submit Google Docs to the Homework Drop Box
Overview of Contract Association Batch Upload
This is a setup file for a Jeopardy game.
Greenfoot November 8, 2009.
Introduction to PowerPoint
Dance Cards Dance Cards
Степень с натуральным показателем
Dance Cards Dance Cards
Dance Cards Dance Cards
Chapter 1 Introducing Small Basic
This is a setup file for a Jeopardy game.
Creating a Simple Game in Scratch
WJEC GCSE Computer Science
Dance Cards Dance Cards
Dance Cards Dance Cards
Presentation transcript:

Bishopston Comprehensive School Unit 2: Bishopston Comprehensive School

What is required? For the online test you are required to complete 3 tasks. HTML (6) Algorithm (9) Greenfoot (15) The Greenfoot tasks follow a pattern and asks almost the same thing every year but with different scenarios. Fantastic opportunity to get some high marks on this section so practise as much as you can. We are going to complete the 2016 controlled assessment task now.

Controlled assessment Task 2016 (15 marks) (a) Populate the world with a cat, a mouse hole and at least two mouse objects. (b) Edit the mouse so that mice turn and move randomly. (c) Edit the program code to make the cat move in the direction of the arrow keys when pressed. (d) Edit the cat so that it “catches” a mouse when they collide (removes the mouse from the world). (e) Add a sound which will play every time the cat “catches” a mouse. (f) Add a counter and edit the cat code so that the counter displays how many mice have been caught. (g) Edit the mouse so that it “escapes” from the world if it collides with the mouse hole (removes the mouse from the world). (h) Edit the mouse code and the counter code if necessary so that the counter loses a point (1 point is deducted) if the mouse “escapes”. (i) Save your completed world as FinalWJECChase

Objects and classes Class: Llama Name: Leroy Age: 5 Leroy the Llama Class Class: Llama Name: Leroy Age: 5 BreedName: Frizzy White HairRating: 10

Brackets in Java ( ) round brackets: Known in the USA as “parentheses”, in the UK these are known as standard brackets. They are used in mathematical expressions, surrounding the parameter lists for method calls. [ ] square brackets: In Java these are used for arrays. { } curly brackets: These are called “braces” or “squiggly brackets”. In Java, these are used to surround blocks of code such as methods of class content.

(a) Populate the world with a cat, a mouse hole and at least two mouse objects. Create a new subclass of ‘Actor’ by right clicking on it and choosing ‘new subclass’. Name the subclass e.g. cat, and choose an image from the categories. If there isn’t anything suitable then choose ‘import from file’ after saving one from the internet. Continue to add other actors in this way. If you are required to add a background. (Hasn’t been a task since the GCSE started) Choose subclass of world instead of Actor. To add the actor to your world, right click and choose new ‘cat()’, mouse(), e.t.c. and place it. Once your actors are placed right click the world and choose ‘save the world’ to stop them from disappearing.

(b) Edit the mouse so that mice turn and move randomly. To program a mouse to move randomly double click on it in the actors list. Enter the following code: Make sure you open and close the ‘{ }’ Run the code by pressing the ‘run’ button. What is going on in this piece of code?

(c) Edit the program code to make the cat move in the direction of the arrow keys when pressed. Double click the cat in the actors list to open the programming page. Enter the following: Now up is done, can you program the cat for the other 3 directions? Down, left and right.

Answer

Greenfoot library REMEMBER: If you forget any of these commands/functions you can always use the Greenfoot Class Documentation. In Greenfoot click ‘help’ – ‘Greenfoot Class Library’ You can then view all the different functions available in Greenfoot relating to the actors, worlds, sounds, images, e.t.c.

Example of Greenfoot Library The next task is to remove the mice once the cat touches it. By using the documentation and clicking on actor we can find what we need.

(d) Edit the cat so that it “catches” a mouse when they collide (removes the mouse from the world). As you can see by using the same layout as the documentation suggests you can get the program to do as you want by replacing the template words. E.g. ‘class’ for the name of the class in this case ‘Mouse’.

(e) Add a sound which will play every time the cat “catches” a mouse. As this is linked with the ‘isTouching’ function we can just add the action into that section. Before we can add the sound we need to download and save one. These will be provided in the actual task. Enter the file name and type e.g. slurp.wav

(f) Add a counter and edit the cat code so that the counter displays how many mice have been caught. For this we need to add a new ‘Counter’ class. Edit – Import Class – Counter – Import Right click the ‘Counter’ actor, choose ‘new counter’ and place it on the screen and save the world. Firstly we want the counter to increase when the cat touches the mouse. We already have the ‘isTouching’ from before so we simply add the following line.

Add counter into the Cat actor as we want it attached to the cat (f) Add a counter and edit the cat code so that the counter displays how many mice have been caught. We want the counter to appear as soon as the program starts but we also need it to reset each time so double click on ‘MyWorld’ class. Add these lines Add counter into the Cat actor as we want it attached to the cat

(f) Add a counter and edit the cat code so that the counter displays how many mice have been caught. Finally to allow the score to increase we need to save it as a variable. We add this section of code in the cat actor. Double click on the ‘cat’ actor.

(g) Edit the mouse so that it “escapes” from the world if it collides with the mouse hole (removes the mouse from the world). Use previous example of the cat touching the mouse to remove it to complete this step. Remember this is the code what would we need to change?

(h) Edit the mouse code and the counter code if necessary so that the counter loses a point (1 point is deducted) if the mouse “escapes”. Where have we done something like this before? Use and add to this code so that if the mouse touches a mouse hole the points are reduced by one.

(i) Save your completed world as FinalWJECChase Once finished click – Scenario / Save as / call the file whatever the exam board asks. In this instance FinalWJECChase

Further tasks – 2014 exam Open the WJECCrabs scenario in Greenfoot. (b) Populate the world with a crab and some wombats. (c) Edit the wombat so that it turns and moves randomly. (d) Edit the program code to make the crab move in the direction of the arrow keys when pressed. (e) Edit the crab so that it “eats” a wombat (removes the wombat from the world) if they collide. (f) Add a sound which will play every time a crab “eats” a wombat. (g) Add a counter and edit the crab’s code so that the counter displays how many wombats the crab has “eaten”. (h) Save your completed world as FinalWJECCrabs

Further tasks – 2015 exam Open the WJECIceBreaker scenario in Greenfoot. (b) Populate the world with a Ship (Icebreaker) and some Icebergs. (c) Edit the Icebergs so that they turn and move randomly. (d) Edit the program code to make the Ship move in the direction of the arrow keys when pressed. (e) Edit the Ship so that it “breaks” an Iceberg when they collide (removes the Iceberg from the world). (f) Add a sound which will play every time the Ship collides with an Iceberg. (g) Add a counter and edit the Ship’s code so that the counter displays how many Icebergs have been broken (removed from the world). (h) Save your completed world as FinaIIceBreaker