I agree with Jon, should be more attentive in class. However, since I am bored right now. will type in a somewhat helpful reply :/
I gather that you need a "Theme and Variation" form of composition.
Here is what I would do ;
- Sit at the piano and start playing simple melody lines that comes to me. Irrespective of scale/mode.
- After quite a bit of rambling , I would really like an idea phrase that i played. So I would try and build it more, in the key that i want it to be. Lets say its D Major.
- Make a 8 bar melody theme out of it.
- Try different chords for your melody. keep it simple at first.
- So now you have a Theme 8 bars long. write it down or record it if you want. then listen to it over.
- While listening to your Theme think of melody lines that can be generated from your theme (Variations). Your options depend of the style of music you are composing for.
For a classical pieces:
You can start the First variation could use the Harmonic melody. i.e. Raise each melody note by 3 notes (within the scale, so F# become A, and B becomes D) or by 5 notes.
You could shorten your notes and make more runs in your melody. So crochtets in a Theme are split into 2 quavers. Choose wisely how you do this , end result should be a Good melody line not a flight of stairs on the music sheet.
During this the chords for the Theme remain the same.
-For the Second variation you could change the key to a related major (D to A ; increase by 5). from major to minor ( D to Dm), or major to its related minor (D to Bm) . From If your Theme is in minor you could change to its major (Dm ->D), (or Dm->F). Such changes are quite tricky but simple trick is to use this transition:
For D-->A
D|Bm|E7|A