ArticleslgStudy

computer science

Greenfoot

Greenfoot is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Greenfoot rather than just read about it. In short: Greenfoot is an integrated development environment using Java or Stride designed primarily for educational purposes at the high school and undergraduate level. It allows easy development of two-dimensional graphical applications, such as simulations and interactive games.

Greenfoot — main illustration
Greenfoot — illustration

Key takeaways

  • Greenfoot belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Greenfoot to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Greenfoot from memory before moving on to harder problems.

Reference excerpt

Greenfoot is an integrated development environment using Java or Stride designed primarily for educational purposes at the high school and undergraduate level. It allows easy development of two-dimensional graphical applications, such as simulations and interactive games. Greenfoot is being developed and maintained at King's College London, with support from Oracle. It is free software, released under the GPL license. Greenfoot is available for Windows, macOS, Linux, Solaris, and any recent JVM.

History The Greenfoot project was initiated by Michael Kölling in 2003, and a first prototype was built by Poul Henriksen (master's student) and Michael Kölling (supervisor) in 2003/2004. From 2005 development was continued involving the other members of the BlueJ Group. Greenfoot is being developed and maintained at King's College London, where the development team moved from the University of Kent. The first full release, Greenfoot version 1.0, was published on 31 May 2006, with further releases following occasionally thereafter. In May 2007, the Greenfoot project was awarded the "Duke's Choice Award" in the category "Java Technology in Education", and in 2010 it won the "Premier Award for Excellence in Engineering Education Courseware". In March 2009, Greenfoot project became free and open source software, and licensed under GPL-2.0-or-later with the Classpath exception. In August 2009, a textbook was published that teaches programming with Greenfoot. In 2017, Greenfoot was extended to support a second programming language, Stride (in addition to Java). Stride is intended to make programming easier for novices, support younger users, and facilitate the transition from block-based languages. Its most notable difference is the use of a frame-based editor.

Use and programming model

The Greenfoot programming model consists of a World class (represented by a rectangular screen area) and any number of actor objects that are present in the world and can be programmed to act independently. The world and actors are represented by Java objects and defined by Java classes. Greenfoot offers methods to easily program these actors, including method for movement, rotation, changes of appearance, collision detection, etc. Programming in Greenfoot at its most basic consists of subclassing two built-in classes, World and Actor. An instance of the world subclass represents the world in which Greenfoot execution will occur. Actor subclasses are objects that can exist and act in the world. An instance of the world subclass is automatically created by the environment. Execution in Greenfoot consists of a built-in main loop that repeatedly invokes each actor's act method. Programming a scenario, therefore, consists mainly of implementing act methods for the scenario's actors. Implementation is done in standard Java. Greenfoot offers API methods for a range of common tasks, such as animation, sound, randomisation, and image manipulation. All standard Java libraries can be used as well, and sophisticated functionality can be achieved.

Design Greenfoot aims to motivate learners quickly by providing easy access to animated graphics, sound and interaction. The environment is highly interactive and encourages exploration and experimentation. Pedagogically, the design is based on constructivist and apprenticeship approaches. Secondly, the environment is designed to illustrate and emphasize important abstractions and concepts of object-oriented programming. Concepts such as the class/object relationship, methods, parameters, and object interaction are conveyed through visualizations and guided interactions. The goal is to build and support a mental model that correctly represents modern object-oriented programming systems.

Learner community For users of Greenfoot, a community site called the Greenfoot Gallery provides a platform to publish and discuss their projects. Anyone can set up an account on the Greenfoot Gallery and publish their work. When published, scenarios run live in a web browser, and are instantly playable by anyone worldwide. The ability to easily publish programming projects to the internet is seen as a significant motivator for young learners.

Educator community For educators, the project provides the Greenroom, a community site to discuss teaching strategies, exchange experiences and share material. In addition to a discussion forum, the Greenroom provides a shared repository of teaching resources, including numerous worksheets, project ideas, slide sets and other teaching aids.

Releases In version 2.0, the editor and API received some major changes from the previous version 1.5.6. The editor added support for code completion, coloured scope highlighting, improved find and replace, and a new navigation view. A built-in sound recorder was added, as well as better support for sound in scenarios through a new high level sound class called GreenfootSound . It adds the ability to pause and loop sounds, as well as adding MP3 support. Version 3.0 added support for the Stride language, and included a novel frame-based editor.

See also

BlueJ

References

Bibliography

External links

Official website Screenshots The Greenfoot Gallery – Gallery of live Greenfoot scenarios Greenroom – teaching resources

Illustrations

Greenfoot illustration

Worked examples

Example 1 — a first encounter with Greenfoot

Start with the simplest possible case. Write down what Greenfoot claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Greenfoot before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Greenfoot ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Greenfoot

In research
Greenfoot appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Greenfoot in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Greenfoot is common in secondary-school and first-year university syllabi. It links to neighbouring topics Educational programming languages, Free integrated development environments, Free software programmed in Java, so understanding it makes those chapters shorter.
In everyday life
Look for Greenfoot outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.

Affiliate

Preply — study more efficiently by working with a personal tutor. 50% off.

How to study Greenfoot in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Greenfoot means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Greenfoot out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Greenfoot in simple terms?

Greenfoot is an integrated development environment using Java or Stride designed primarily for educational purposes at the high school and undergraduate level. It allows easy development of two-dimensional graphical applications, such as simulations and interactive games.

Why does Greenfoot matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Greenfoot?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Greenfoot.

Tags

  • Educational programming languages
  • Free integrated development environments
  • Free software programmed in Java
  • Integrated development environments
  • Java development tools
  • Linux programming tools
  • MacOS programming tools
  • Pedagogic integrated development environments
  • Programming tools for Windows
  • Software using the GNU General Public License

Keep exploring