3/10/2024 0 Comments Greenfoot sound code![]() Do not ask exact duplicates of FAQ questionsĭo not post questions that are an exact duplicate of something already answered in the FAQ. See our policies on allowed topics for more details.Ĥ. Questions that straddle the line between learning programming and learning other tech topics are ok: we don't expect beginners to know how exactly to categorize their question. Tech support and hardware recommendation questions count as "completely unrelated". Self promotion from first time posters without prior participation in the subreddit is explicitly forbidden.ĭo not post questions that are completely unrelated to programming, software engineering, and related fields. When in doubt, message the mods and ask them to review your post. Your post should not "feel spammy".ĭistinguishing between tasteless and tasteful self-promotion is inherently subjective. In short, your posting history should not be predominantly self-promotional and your resource should be high-quality and complete. When posting some resource or tutorial you've made, you must follow our self-promotion policies. See our policies on acceptable speech and conduct for more details. Disagreement and technical critiques are ok, but personal attacks are not.Ībusive, racist, or derogatory comments are absolutely not tolerated. Communicate to others the same way you would at your workplace. No unprofessional/derogatory speechįollow reddiquette: behave professionally and civilly at all times. See conceptual questions guidelines for more info. If your question is similar to one in the FAQ, explain how it's different. Read our FAQ and search old posts before asking your question. Many conceptual questions have already been asked and answered. See debugging question guidelines for more info. If you got an error, include the full error message. The output you expected, and what you got instead.A minimal, easily runnable, and well-formatted program that illustrates your problem.If you need help debugging, you must include: Without some general background and some details as to how this relates to your project, it would be impossible to nail down how you should proceed.Welcome to LearnProgramming! New? READ ME FIRST! Posting guidelines Frequently asked questions Subreddit rules Message the moderators Asking debugging questions Changing the volume of this new sound object does nothing for the sound that might currently be playing. Here, you create a NEW Start object, which, in turn, creates a NEW GreenfootSound object. Lines 33 and 34 in your VolumeUp class clearly shows another misconception. Just take from it what extending a class should be doing. Do not take this as meaning your classes should be as described here. Button, in turn, could by extended by Start, VolumeUp and VolumnDown - describing 3 distinct actors. ![]() Actor might be subclassed by Button, for a generic button actor object (notice the last three words). All its subclasses will describe some actor type more specifically. The Actor class, which extends Object, describes any generic actor. The Object class is the root of ALL classes. A subclass usually describes the object more precisely. Since a VolumeUp object is NOT a Start object, neither should extend the other. A subclass is to describe the same type object as its parent class. * the 'Act' or 'Run' button gets pressed in the environment.Īpparently, you do not understand what it means when you make a class extend another (subclassing). * Act - do whatever the Start wants to do. Public void setMySound(GreenfootSound mySound) Public Start(GreenfootSound mySound, int volumeA) Private GreenfootSound mySound = new GreenfootSound("Twice - I CAN'T STOP ME.mp3") * Write a description of class Start here. Import greenfoot.* // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |