



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!




Text of your class file (.java) Where you interact with Java List of class files that you have open
Object-oriented programming is about modeling and simulation
Explaining what’s going on
An example with Music
import jm.util.; import jm.music.data.; Note n1; n1 = new Note(60,0.5); // Create an eighth note at C octave 4
import jm.util.; import jm.music.data.; Note n1; n1 = new Note(60,0.5); // Create an eighth note at C octave 4
import jm.util.; import jm.music.data.; Note n1; n1 = new Note(60,0.5); // Create an eighth note at C octave 4
Note n2=new Note(64,0.5); View.notate(n1); Error: No 'notate' method in ' (jm.util.Viewjm.music.data.Note' with arguments:) Phrase phr = new Phrase(); phr.addNote(n1); phr.addNote(n2); View.notate(phr); -- Constructing MIDI file from'Untitled Score'... Playing with JavaSound ... Completed MIDI playback --- ----- What’s going on here? Note n2=new Note(64,0.5); View.notate(n1); Error: No 'notate' method in 'jm.util.View' with arguments: (jm.music.data.Note)
What’s going on here?
Phrase phr = new Phrase(); phr.addNote(n1); phr.addNote(n2); View.notate(phr); -- Constructing MIDI file from'Untitled Score'... Playing with JavaSound ... Completed MIDI playback --------
<Nothing we’ve seen yet> A musical note and a duration