Kakihijau.googlepages.com Introduction To Greenfoot Part-3.

Slides:



Advertisements
Similar presentations
Jump to Contents Instructor Tutorial essignments.com Paperless assignment submission system.
Advertisements

Version Control System (Sub)Version Control (SVN).
Getting to know Greenfoot
1. Chapter 29 Creating Forms 3 Understanding Forms Word enables you to create fill-in forms to eliminate the need for storing pre-printed forms. Add.
of Kent A practical introduction to Greenfoot David Barnes Lecturer in Computer Science University of.
Wombats Creating Games with Greenfoot The Walker School – Games and Simulations
Chapter 1 - Getting to know Greenfoot Bruce Chittenden.
Chapter 1 - Getting to know Greenfoot Acknowledgement: Michael Kolling & Bruce Chittenden.
1 of 6 This document is for informational purposes only. MICROSOFT MAKES NO WARRANTIES, EXPRESS OR IMPLIED, IN THIS DOCUMENT. © 2007 Microsoft Corporation.
1 of 4 This document is for informational purposes only. MICROSOFT MAKES NO WARRANTIES, EXPRESS OR IMPLIED, IN THIS DOCUMENT. © 2007 Microsoft Corporation.
Jul The New Geant4 License J. Perl The New Geant4 License Makes clear the user’s wide- ranging freedom to use, extend or redistribute Geant4, even.
1 of 4 This document is for informational purposes only. MICROSOFT MAKES NO WARRANTIES, EXPRESS OR IMPLIED, IN THIS DOCUMENT. © 2006 Microsoft Corporation.
What is so good about Archie and RevMan 5
Analysis Modeling (cont’d) CpSc 372: Introduction to Software Engineering Jason O. Hallstrom Authorship Disclaimer. These slides.
The audio will be turned on just before our start time at 7:00 pm ET.
1 EPICS EPICS Licensing BESSY, May 2002 Andrew Johnson.
Creating a Presentation
The ePortfolio and Student Evaluation A training presentation by: Amy Cannady Robin Drewry Bonnie Hicks.
Territory Mapper The Alignment Copyright 2010, TTG, Incorporated.
Greenfoot. Getting Started Open the Greenfoot download site: Select Greenfoot
Enrolment Services – Class Scheduling Fall 2014 Course Combinations.
Nancy Severe-Barnett Program Coordinator, SCIS
Chapter 1 - Getting to know Greenfoot
Conditions. Objectives  Understanding what altering the flow of control does on programs and being able to apply thee to design code  Look at why indentation.
Guess What’s Behind the Box Next Slide Remove Box Next Slide.
Skip Intro Points Team One Team Two Team Three Team Four Team Five Team Six Team Seven Team Eight End Game.
Lecture 4. Greenfoot 1 Pablo Romero, Department of Informatics Greenfoot Programming simulations and games in Java.
CS Data Structures I Chapter 2 Principles of Programming & Software Engineering.
©2008 TTW Where “Lean” principles are considered common sense and are implemented with a passion! Product Training RMA.
Topic 1 Object Oriented Programming. 1-2 Objectives To review the concepts and terminology of object-oriented programming To discuss some features of.
Greenfoot Game Programming Club.
SilkTest 2008 R2 SP1: Silk4J Introduction. ConfidentialCopyright © 2008 Borland Software Corporation. 2 What is Silk4J? Silk4J enables you to create functional.
National Alliance for Medical Image Computing Licensing in NAMIC 3 requirements from NCBC RFA (paraphrased)
Lesson 1: Writing a program. Java Java is a programming language Computer cannot understand it, though it can be translated ( compiled ) so a computer.
Kakihijau.googlepages.com Introduction To Greenfoot Part-1.
Click to add text © 2012 IBM Corporation 1 InfoSphere Streams Streams Console Applications InfoSphere Streams Version 3.0 Warren Acker InfoSphere Streams.
Kakihijau.googlepages.com Introduction To Greenfoot Part-2.
Learning Modules (Lessons) Randy Graff, PhD Symposium on Teaching and Learning with Technology ELearning in Sakai.
BUG COLLECTING PowerPoint Review Game By Catherine Slight and Lin Pearson How to work the PowerPoint This game is made of two PowerPoint presentation.
José Aponte Public Health Advisor Module 3: Adding Intelligence to Forms 12 June 2012 Epi Info™ 7 Introductory Training Office of Surveillance, Epidemiology,
How to Use The Creative Commons Licenses. [formats]
Introduction to Blackboard Rabie A. Ramadan Session 3.
Adding and Eating Worms Mrs. C. Furman August 23, 2010.
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.
Free Software - Introduction to free software and the GPL Copyright © 2007 Marcus Rejås Free Software Foundation Europe I hereby grant everyone the right.
1 How to manually package PO Lines Yoel Kortick Alma Global Support Manager.
Open Source Software Practices
About SharePoint Server 2007 My Sites
Chapter 3 – Improving the Crab Game
Introduction To Greenfoot
Creating Games with Greenfoot
The Racing Game of Knowledge
The Racing Game of Knowledge
BEGINNER EV3 PROGRAMMING Lesson
Version 2.
Guess What’s Behind the Box
Insert Your Text Here.
Select from the most commonly used minutes below.
Do you Dare Challenge The Great, All Knowing Robot Robie!
Product Training RMA Where “Lean” principles are considered common sense and are implemented with a passion! ©2008 TTW.
Greenfoot November 8, 2009.
This presentation document has been prepared by Vault Intelligence Limited (“Vault") and is intended for off line demonstration, presentation and educational.
This presentation document has been prepared by Vault Intelligence Limited (“Vault") and is intended for off line demonstration, presentation and educational.
The Actions Window: Making your life easy since 2011.
Poul Henriksen Computing Laboratory University of Kent
BEGINNER EV3 PROGRAMMING Lesson
BEMS user Manual Fundación cartif.
Using This Presentation
Bishopston Comprehensive School
Presentation transcript:

kakihijau.googlepages.com Introduction To Greenfoot Part-3

Introduction to Greenfoot Eueung Mulyana | kakihijau.googlepages.com 2 Disclaimer  This document is intended to give a beginner an introductory material for the Greenfoot system. Greenfoot is a software framework made by Poul Henriksen and Michael Koelling at University of Kent / Deakin University. More information can be found at  This document is available „AS IS“ free of charge for personal use and non-commercial redistribution. It may not be sold for profit or included in other packages which are sold for profit without written authorisation. This document is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; your use of the document is at your sole risk. Reusing and modifying (part of) this document is allowed, as long as you state explicitly that your work is based on the original document produced by the copyright holder: Eueung Mulyana. The author can be contacted via eueung-[at]-yahoo.com (

Introduction to Greenfoot Eueung Mulyana | kakihijau.googlepages.com 3 Purpose  This is the second part of the document „Introduction to Greenfoot“ and focuses on two topics: modification and programming of the wombats scenario  Part of the content of these slides is based on the Greenfoot Tutorial made by Michael Koelling, publicly accesible at the Greenfoot website,

Introduction to Greenfoot Eueung Mulyana | kakihijau.googlepages.com 4 Outline  Changing the Behaviour  Changing Representations  Creating New Classes

Introduction to Greenfoot Eueung Mulyana | kakihijau.googlepages.com 5 Changing the Behaviour (1)  We want to change the behaviour of Wombat objects : instead of always turning left, they shall be able to turn to other directions in a random way  We will add an additional method, called turnRandom()  Open the source code of the Wombat class, add the following codes call turnLeft() turns times Generate a random number between 0 and 3

Introduction to Greenfoot Eueung Mulyana | kakihijau.googlepages.com 6 Changing the Behaviour (2) if you find leaves, eat ! if you don‘t find leaves, but you can move forward, then move! if you don‘t find leaves and you also cannot move, then turn to a random direction!

Introduction to Greenfoot Eueung Mulyana | kakihijau.googlepages.com 7 Changing the Behaviour (3)

Introduction to Greenfoot Eueung Mulyana | kakihijau.googlepages.com 8 Changing Representations (1)  Visual representation (image) of an object can be changed in two different ways –Changing the „class image“; in this way, all objects of the same class shall look the same (to the assigned class image) –Changing the image programmatically; in this way, objects of the same class might look different, depending on the implementation  These two ways might be combined!

Introduction to Greenfoot Eueung Mulyana | kakihijau.googlepages.com 9 Changing Representations (2)

Introduction to Greenfoot Eueung Mulyana | kakihijau.googlepages.com 10 Changing Representations (3)

Introduction to Greenfoot Eueung Mulyana | kakihijau.googlepages.com 11 Changing Representations (4) the result of populate() after changin the class image Additionally change the class image then add 2 objects after modification

Introduction to Greenfoot Eueung Mulyana | kakihijau.googlepages.com 12 Changing Representations (5) to set the image of an object programmatically

Introduction to Greenfoot Eueung Mulyana | kakihijau.googlepages.com 13 Changing Representations (6)

Introduction to Greenfoot Eueung Mulyana | kakihijau.googlepages.com 14 Creating New Classes (1)  We could not only modify the behaviour of objects, but also add a completely new type of objects i.e. create new classes  Right-click the class Actor and choose item „New subclass...“, enter the class name and select a class image in the dialog; Greenfoot will automatically generate your class !  In this case we add a new class, called Rock. The image for this class is already available in the wombats scenario folder class image for the Rock class images available in the wombats scenario folder

Introduction to Greenfoot Eueung Mulyana | kakihijau.googlepages.com 15 Creating New Classes (2)

Introduction to Greenfoot Eueung Mulyana | kakihijau.googlepages.com 16 Creating New Classes (3) check all Rock objects in front of you; if there is no Rock object, return true (i.e. okay it‘s clear!), otherwise return false (i.e. you cannot move!)  To stop wombats from walking through rocks...

Introduction to Greenfoot Eueung Mulyana | kakihijau.googlepages.com 17 Creating New Classes (4)