This site requires JavaScript, please enable it in your browser!
Greenfoot back

Report as inappropriate.

kiarocks presents ...


Text Editor

allows you to make and delete text
Saving and loding on computer only!!!
and check out Fresh Programming!

9511 views / 2174 in the last 7 days

5 votes | 0 in the last 7 days

Tags: simulation with-source

This scenario is a member of: Fresh Programming Games

open in greenfoot
Your browser does not support the canvas tag.
A new version of this scenario was uploaded on Sat Aug 20 14:30:05 UTC 2011 Source Code!


...and don't forget to check


Cool! Heh, I made one! however it opens a new window sonce it's based off reg. Java! PS: You're in Fresh Programming!


I know. Where is yours?


Look at my profile.


All right, I need some help from you for a Fresh Programming Greenfoot Scenario. Devise a class that finds all the classes that implement interface A and creates an object of each class.


That Fresh Programming Weebly Website, Barely Interactable. I made a new one here: It's an enjin one, and I'll see to make it home.


Actually, I just realized that the Website has a Forum and Chat, but requires a new account. Enjin websites, also needs a new account, but Enjin accounts can join any enjin forum.


nicht schlecht


Hey Guys, something different form your discussion. Can someone help me here?I have this: import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo) /** * Write a description of class MyDog here. * * @author (your name) * @version (a version number or a date) */ public class MyDog extends Dog { private String image = "dog.png"; private int energy = 100; private boolean amSleepy = false; private int countSteps; /** * Act - do whatever the MyDog wants to do. This method is called whenever * the 'Act' or 'Run' button gets pressed in the environment. */ public void act() { //All code relating to the player-controlled dog goes here walkMyDog(); } } /** * This dog gets sleepy when its energy hits 20 or lower. */ public boolean isSleepy(){ if ( energy <= 20 ) { amSleepy = true; } else { amSleepy = false; } return amSleepy; } Now every time I try to compile this, I have this error displayed: class, interface, or enum expected with emphasis in the source code highlighting this whole method in yellow: ' public boolean isSleepy() ' , also marking a redline before |boolean. What am I doing wrong, please tell me?

See all comments

Want to leave a comment? You must first log in.

Who likes this?

A22347 Cocky MathManiac Slinger Locomotion15