No one can really teach someone how to write a melody. If one shows by example oftimes the example becomes the melody and there by removes the writing process because the student has just been handed the muse. That being said. All anyone can teach is how to build a melody from a motive and how to organize your motives
Take one concept a week. Work it to death for that week and roll it over into the next week. Concepts don't automatically dovetail or stack. One concept for a melodic idea may not work when juxtapositions it against another.
So lets define what a memorable melody is. A memorable melody is one that stays with you. It's repeated it has variation and while I don't like to use the term resolve. It should have a starting point a middle and a conclusion. We often confuse lyrics with melody. A melody stands on it's own without lyrics.
Here is your project for today. Listen to an instrumental cover of a popular song. You don't have to cover it but you should give it a good listen. A solid musician is not satisfied with simply playing the right notes in the right order. They try to imbue the vocal and expressive quality of the performance. Listen to the phrasing. Phrasing is what makes a song memorable. How the notes roll off the performance. Listen to the motives. Usually there are two to four ideas carried in a single chorus or verse. The ideas are phrased to separate then rather then a long stream of endless notes. Listen to the technique. How accents, vibrato and other methods are used to send the mental cues.
So todays lesson is just listening. Attentive listening can be your greatest ally. Listening is core to your understanding. Usually when a writer or performer has a breakthru moment it's because he listened to and followed his inner listener.