Needed to Write a program dun know how to start  Can anyone suggest

Objective
The student will develop classes to implement Dancing
Turtles using the ACM graphics library.
Special Requirement
This assignment uses the acm.graphics package developed by the ACM
and SIGCSE Java task Force,in particular the turtle graphics class
GTurtle.
Running Programs using the Graphics Library
It turns out that it is easier to run Java Applets using
the Graphics library that Java applications. There
is one subtle differences in your code. There is no longer a main()
method. Instead, your main class
implements an instance method named run(). The other difference is
that you choose to run the
program as an applet. In fact, without the main method, the Run As Java Application menu option
doesn't even show up.
Turtle Graphics Background
Using turtles to create graphics goes back to 1967 with the development
of the Logo language by Wally
Feurzeig and Seymour Papert. It uses a set of simple commands to have a
turtle move around a screen,
leaving a drawn path in its wake. This simple approach to creating
graphi
cs has been repeated in many
different places, including the ACM graphics library. If you look at
the GTurtle class in the ACM
library, you see very intuitive methods like forward() and right(angle).
Your instructor has put a copy of a simple Simple Turtle Graphics
program on your course web page.
The easiest way to run this program is to copy it into an eclipse class of the same name. Then choose
Run As -> Java Applet.
Suppose that we would like to model turtles that dance. One kind of
turtle will move according to adance step pattern that is specified by a sequence of directions in which the turtle is to move. This type
of turtle is a lead dancer.
A second kind of turtle is the follower; this turtle will have a reference to
another turtle and will mimic its moves by moving in the same direction
on each move. You are to implement these two turtle classes and any other interfaces and classes you need to get the job done.
TurtleMove class
Develop a small class named TurtleMove. Each object of type turtle move
should have two instance
variables:
? a String named action that contains the action ("forward" or "right")
that the turtle is to do.
? a double named arg that contains the argument (if any) for the action.
The DancingTurtle Interface
Develop an interface named DancingTurtle that contains declarations
for the following two
methods:
public void move();
public TurtleMove getMove();
LeadTurtle
Develop a class named LeadTurtle. Lead turtles extend GTurtle and
implement DancingTurtle.
The LeadTurtle's only constructor takes an array of TurtleMoves as its
parameter. Each time move() is called, the next move in the array is executed. When the list is exhausted, it starts again at
the beginning. A call to getMove() returns the next move that is to be
executed.
FollowerTurtle
This type of turtle is assigned another turtle as its "leader" when it
is constructed (this means that the
other turtle must exist before this turtle is created). The leader is
passed as a parameter to the
constructor. A follower turtle's move() method calls the leader's
getMove() method to determine
what to do next. Note that FollowerTurtles also must implement
getMove(), as a
FollowerTurtle might be another turtle's leader.
Write a separate class with a run method to test your code. Your
instructor will run your test code, but also test your program using his own test driver.
.

No one is going to do your work for you. What you need to do is break it down step by step, and implement one feature at a time.
I would start with the TurtleDancerLead and TurtleDancer, and write down what features each would need, and any common features. When you get some code written and get stuck, post what yo uhave here and ask a specific question, and someone will be gald to help.
Quite frankly, I'm somewhat amazed at the amount of info provided to you, everything you need is there, I believe.
~Tim

Similar Messages

  • Hi I need help ..I do not know how to edit a pdf file that I scanned in,

    Hi I need help ..I do not know how to edit a pdf file that I scanned in, will someone please tell me what I should do PLEASE HELP

    What program are you using?  If it is just Adobe Reader you can not edit.
    Say thanks by clicking the Kudos Thumbs Up to the right in the post.
    If my post resolved your problem, please mark it as an Accepted Solution ...
    I worked for HP but now I'm retired!

  • Hi!! I need help: I'd like to know how to obtain a communicaion between a PLC of ABB model 07 KT 97 and Labview 8.

    Hi!! I need help: I'd like to know how to obtain a communicaion between a PLC of ABB model 07 KT 97 and Labview 8.I have to realize a scada system to control an electrical implant.I think that I need to learn more about OPC server: do you have some manual and tutorial to help me step by step in this configuration?And do you have some examples (one time PLC is connected and well configurated) to realize communication with Labview software?
    thank you so much!!
    please!!!Answer soon because I need help!!!

    Hi Leoeffe,
    I've found some documents that cam help you to understand how is possible to communicate
    unsing OPC Servers and ho use them in Labview 8.
    First of all I suggest to take a look to these documents:
    How Do I Use OPC in LabVIEW?
    http://digital.ni.com/public.nsf/websearch/EA15F53DB6FECCA5862567240064DF09?OpenDocument
    Connecting LabVIEW to an OPC Server through a DataSocket Connection
    http://zone.ni.com/devzone/conceptd.nsf/webmain/DF8C0A4BA2E2B22A86256A3700592BEA
    Using the LabVIEW Shared Variable
    http://zone.ni.com/devzone/conceptd.nsf/webmain/5b4c3cc1b2ad10ba862570f2007569ef
    You can also use the Labview DSC module:
    Developing Monitoring Applications with the LabVIEW DSC Module for Control Systems
    http://zone.ni.com/devzone/conceptd.nsf/webmain/199c3fb9456a16d986256b5200678917
    LabVIEW 8 DSC Simplifies Distributed Development
    http://zone.ni.com/devzone/conceptd.nsf/webmain/d76c3788a0c4c5668625708b0072987c
    Tools for Troubleshooting OPC Interface Problems
    http://zone.ni.com/devzone/conceptd.nsf/webmain/401CB3A4E216356286256BC7004B5831
    I hope all these tutorials can help you.
    Best regards,
    MarcoL

  • I cannot connect a Sony ILCE6000 camera for wireless downloading. Sony feels I need DLNE? They do not know how to make it work. Can anyone help OS10·9·5

    I cannot connect a Sony ILCE6000 camera for wireless downloading. Sony feels I need DLNE? They do not know how to make it work. Can anyone help OS10·9·5

    I cannot use the software.. so you need to figure out where the problem is..
    But let me suggest.. the Mac is not the issue and likely the info from Sony is also up the creek.. they make PC's after all.
    It is far more likely the camera is having issues with the wireless network.
    Do you know you have a connection to the home network on the camera.. ?? You have an IP address and some internet or local access at least?
    How you will discover those things is by fiddling.. but if you can tell me what wireless AP you are using that will help.

  • I need to copy and paste as I am loading content onto my website through an online user panel, I dont have the know how to start re-writing coding as the help message stated when I try to copy some text, is there a simple solution to this task?

    I really need to copy and paste as I am uploading content onto my website through an online user panel, I dont have the know how to start re-writing coding as the help message stated when I try to copy some text, is there a simple solution to this everyday type task? Thanks in advance. Mark in Cheshire.

    kaymarhar wrote:
    Because it took me AGES to manually configure the text to wrap around my little pig friend there and I would be so bummed if I had to do it again
    Next time, you can use the Text Wrap function, so you don't need to manually wrap the text.

  • I need to know how many conections can i have with a license of adobe medie server proffesional

    i need to know how many conections can i have with a license of adobe medie server proffesional
    i need some help. thanks

    I don't have apps on my phone so i can;t do anything

  • I don't know much about computers can anyone walk me through this ? How Do I Change The Software Update Server Address On A Client  ? what do I open and how do i put it in the right spot?

    I don't know much about computers can anyone walk me through this ? How Do I Change The Software Update Server Address On A Client  ? what do I open and how do i put it in the right spot?

    The simplest method is to run a defaults command on the client Macs (easily pushed via Apple Remote Desktop):
    defaults write com.apple.SoftwareUpdate CatalogURL 'HTTP_URL_FOR_CATALOG'
    for a user. If you run it via sudo it will set it for whenever you use softwareupdate as root.
    The HTTP_URL_FOR_CATALOG has been changed with Mac OS X 10.6.  If you use MCX it will automatically pick the new catalog – however if  doing it manually the following URLs need to be used for whichever  client version is in question:
    Mac OS X 10.4: http://mysus.example.com:8088/index.sucatalog
    Mac OS X 10.5: http://mysus.example.com:8088/index-leopard.merged-1.sucatalog.sucatalog
    Mac OS X 10.6: http://mysus.example.com:8088/index-leopard-snowleopard.merged-1.sucatalog
    Mac OS X 10.7: http://mysus.example.com:8088/index-lion-snowleopard-leopard.merged-1.sucatalog
    Mac OS X 10.8: index-mountainlion-lion-snowleopard-leopard.merged-1.sucatalog
    To double check this applied you can run the following command:
    /usr/libexec/PlistBuddy -c Print /Library/Preferences/com.apple.SoftwareUpdate.plist
    and /usr/libexec/PlistBuddy -c Print ~/Library/Preferences/com.apple.SoftwareUpdate.plist
    to see what settings are for the computer and user appropriately.
    If  this is working correctly when running Software Update (GUI) you should  see the server address appear in parenthesis in the title of the  window.
    MCX
    Another alternative is to use Workgroup  Manager to manage the preferences via MCX from your server. This can be  done for users, or for computers if they are bound to your Open Directory.
    If you are using 10.5 Server or newer: you can simply use the Software Update section under Preferences.
    Manually:
    Choose the accounts, computers, or groups to have the preference applied to.
    Click on Preferences, and then the Details tab
    Press the Add… button and navigate to /Library/Preferences/com.apple.SoftwareUpdate.plist
    Press Edit…
    Under Often, add a New Key and enter the name CatalogURL
    Make sure the type is string and then enter your SUS URL (eg. http://mysus.example.com:8088/index.sucatalog or if using 10.6: http://mysus.examle.com:8088/ – see above from the defaults section)
    Press  Apply Now, then Done. Once users/computers have refreshed their MCX  settings (usually the next login or restart) the new settings will take  over.
    If this is working correctly when running Software  Update (GUI) you should see the server address appear in parenthesis in  the title of the window.
    In order to have a system-wide configuration one has to run the following:
    sudo defaults write /Library/Preferences/com.apple.SoftwareUpdate CatalogURL "http://your.updates-server.lan:8088/index.sucatalog"
    In order to correctly work both on Leopard and Snow Leopard the right command to issue is:
    defaults write /Library/Preferences/com.apple.SoftwareUpdate CatalogURL "http://your.updates-server.lan:8088/index-leopard-snowleopard.merged-1.sucatalog"
    Happily used and tested on my network
    The DNS trick that Chealion points out is fantastic. I use it at our office, and every computer on our LAN  will automatically pull the updates from the local repository at high  speed without any configuration.
    Create the swscan.apple.com DNS zone on your internal DNS server, and have it resolve via an A record to your Mac
    Tags: automaticupdates mac clients macosx setting as default software update
    Category: Serverfault
    Share
    0
    0
    Google +
    0
    0
    0
    5
    You might also like:
    Can I Update My Jb 4s To 6.1.2 Without Restore? Tue. Jan 21st, 2014
    Iphone 4 Not Charging After Update To IOS6 
    IPad 2 Not Updating To IOS 5.1 
    How To Resolve The â€âunable To Install Update” Error For OTA IOS Updates? 
    What Is â€âSoftware Update” Doing When It Says â€âChecking For New Software”? 
    Advertisement
    Comment
    - See more at:  http://www.eonlinegratis.com/2013/how-do-i-change-the-software-update-server-add ress-on-a-client-mac-to-use-my-own-server/#sthash.YhHp5zWk.dpuf

  • Hello, sombody knows how to start MS Excel from LabView (version 8.2)? Thanks

    Hello, sombody knows how to start MS Excel from LabView (version 8.2)? Thank you in advance.
    Regards Robert

    In the example finder  ">Help>Find Examples >>search for Excel", you'll find a sample program called "ActiveX Event Callback for Excel".
    It opens the Excel Application..  You can build on this to open/create new worksheet(s), etc.
    RayR
    Message Edited by JoeLabView on 06-20-2007 08:21 AM
    Attachments:
    OpenExcel.PNG ‏34 KB

  • I just downloaded CS6 and don't know how to start it... Please advise

    I just downloaded CS6 and don't know how to start it... Please advise

    After downloading it have you installed it ?
    If you are on Windows run the .exe file to install it and if on a MAC run the .dmg file to install the program.
    If you have already installed it, then on Windows click on 'Start' button > Go to 'All Programs' and select the application you want to launch from the CS6 Suite.
    If on a MAC the program is listed under 'Applications'

  • I just got iphone 5c and i am not happy with it. It uses to much data and i don't even know how. I can't get the ringtones i want for my contacts.I got it on my free upgrade but i want to take it back and get something else but where i got it they say i c

    I just got iphone 5c and i am not happy with it. It uses to much data and i don't even know how. I can't get the ringtones i want for my contacts.I got it on my free upgrade but i want to take it back and get something else but where i got it they say i can't because i don't have the earbuds and i have serches or them. now i am suck with a phone i don't like at all until my next upgrade. this is very dishearten

    1. If you are this unhappy with that phone, and the lost earbuds is the only thing stopping you from taking it back, why do not just buy some earbuds. That way you can get rid of that phone. It all depend upon how much you want to get rid of that phone.
    2. Yet if you are stuck with that iPhone, here is something might help you to control the data usage. By design, iPhones do turn off WiFi when they go dormant. So if a download is in progress and so forth when the phone goes dormant, it will switch to use cellular data, if this setting is left on. Therefore, from multi-sources I have learned that if you keep your iPhone connected to a power source, then it will stay connected to the available WiFi.

  • HT5625 my apple id has been disabled and i do not know how do i can download app from app store again

    my apple id has been disabled and i do not know how do i can download app from app store again

    If changing your password does not resolve, then contact itunes support

  • I have just updated my software on my iPhone 4S to IOS7.0.4 now I have lost many of my contacts.   Can anyone suggest an easy way to reinstate them.  (Without having to add them all again as I don't know what I have lost until I need it).

    I have just updated my software on my iPhone 4S to IOS7.0.4 now I have lost many of my contacts.   Can anyone suggest an easy way to reinstate them.  (Without having to add them all again as I don't know what I have lost until I need it).

    Try assigning Queen as the Album Artist on the compilations in iTunes on your computer.

  • My 6th generation nano isn't recognized by my computer. When I plug it in an error message pops up, which says "USB Device Not Recognized". Does anyone know how to start trouble shooting this. I updated both windows and iTunes.

    My 6th generation nano isn't recognized by my computer. When I plug it in an error message pops up, which says "USB Device Not Recognized". Does anyone know how to start trouble shooting this? I updated both windows and iTunes.

    Work through all the suggestions in this Apple support document first.
    iPod: Does not appear in Windows or iTunes and Device Manager is empty
    B-rock

  • I want to bring my iTunes and content from a Windows PC to my new MAC mini and dont know how to start

    I did find the migration assistant on the MAC but no counterpart on my PC.
    Therefore I don´t know how to start.
    I found the
    www.apple.com/migrate-to-mac
    page.
    I think this will help with the migration assistant for Windows

    Move iTunes Library from PC to MAC
    http://www.macworld.com/article/146958/2010/03/move_itunes_windows_mac.html

  • How to know how many equipments can be produced?

    Hello friends,
    One equipment is having bill of material.  How to know how many equipments can be made with the stores stock? How to know for making min. no. of materials reqd for making optimum no. of equipments?
    bye,
    srinivas.

    Hi,
    Please have a look at the Rules of Engagement before posting to these forums. The link is here:
    [https://www.sdn.sap.com/irj/sdn/wiki?path=/display/home/rulesofEngagement]
    Once you have read the above, please provide the necessary information.
    Regards,
    Amit

Maybe you are looking for