When you fingerpick a D Major chord there are three standard bass lines. The key note (D) is on the open fourth string. Next are the three different bass lines used in Exercises 17 to 20.
The melody notes used for the D major chord are a mixture of the D Major scale and the D Blues scale.
Example Seventeen uses a slide from the first fret on the first string. Slide the entire D chord for convenience.
Example Eighteen is played with a bar on the second fret so you can play the top A note on the fifth fret.
Example Nineteen is a commonly used shape. It is a C7 chord moved up the fretboard two frets.
Example Twenty is another popular shape used for D Major licks. Note the use of the F# bass note played with the thumb.