Change Contents of the Bubble
View this PageEdit this PageUploads to this PageHistory of this PageHomeRecent ChangesSearchHelp Guide

Questions on HW3-Summer07

Ask Questions on homework 3 here. Please enclose code with <code> </code> tags.

Question: How can you make the turtles pause when moving in the world?

Question: When I am trying to
import jm.JMC;
it keeps saying
ClassNotFoundException: jm$JMC
what does that MEAN???? i downloaded Jmusic and i thought everything went right. not really sure what to do.

Question: crap, what's the difference between sounds and music?

Question:What does the error "class" or "interface" expected mean?? I wrote a method in to make the turtle do a specific dance so that way i could just use, but when i compile the code, i get the above error.

Question: On Tsquare, what is the difference between submitting on the "assignment" page vs submitting it under the Assignment "auto submission" page?? Which one should we use?

Question: Even though I added extra classpaths in the DrJava's preferences, every time I try to
Error: C:\cs1316\java-source-Fall06\ package does not exist
comes out. What should I do?

QuestionWhat is the method to use to get the song to play. I konw you can use node.showFromMeOn() and it brings the notes up and you hit play but I want it to start playing automatically when i run my code. Is there a node equivalent of;?? I hope that question makes sense

Question: When it says to turn in the picture of the resultant list structure, what do we use to make that??

Where could I draw my daily entertainment if I didn't have the benefit of your sarcastic comments?

Question: I have a really basic question. Do you declare/define your turtle objects and riff objects BEFORE you start your main method or in the body of the main method? In general, I'm not clear how the main method should relate to other methods and objects. (And please say something sarcastic in response for my amusement...)

More basic and related questions: 1) after you create your SongNodes, do you then need to create a linked list data structure from these?, or 2) do the operations on the SongNodes CREATE the list structure (rather than operating on an original, specified one)?, and 3) do these operations (that is, weave, repeatNext, or repeatNextInserting) operate on the product or output of the previous operation, so that a resultant woven list, for example, is then used to insert new phrases in the next operation?, and 4) do these operations act in the sequence in which they are specified in the program?, and, finally, 5) if you have methods that manipulate the phrases and control the dance of your turtles both placed in the main method (assuming that is correct to do), are these, in effect, implemented in parallel? I guess I am generally confused about the nature of the control structure in this object-oriented hocus-pocus. Can we go back to structured programming? ;)
  1. Yes. After declaring your SongNodes, you must then link them together to create linked list.
  2. It really depends on how you want to do it. I would go ahead and create a basic list and then use weave and either repeatNext or repeatNextInserting to add extra nodes to it.
  3. These methods operate on (sometimes creates) the list itself. I don't really understand the example you stated.
  4. The lines in the main method always execute from top to bottom.
  5. I guess this part has to do more with whether or not the turtle dance and the music will occur in tandem. When you put the line of code to play the music before your turtle movement, Java executes the line to play the music but will move on before the music finishes, because you only really asked it to play the music. Though this may all seem to be some type of witchcraft, I do assure you that it works and encourage you to test it yourself (well you kind of have to if you want to get all points for your homework)
I hope I answered all of your questions. Dawn Finney.

The documentation for the repeatNext method says that it appends the input phrase to the "current" node. What is the current node in this context? The last node of the previously transformed linked list?

Question: Please remind me how to slow the progress of turtles moving in a world so as to make the motion visible. Thank you.

Link to this Page