The patterns to make a dog cap like this are two: the cap (head) and the visor. For a more professional finish cut two pieces of each pattern to make the visor double and the head side with lining.
To get the visor part rigid paste a piece of cardboard or some fine plastic or other rigid material between the fabric layers. Or you can simply use thick fabric.
This is a preview of the patterns (the right side in black). Please note that you have to cut the two patterns with the fabric folded in half, so you can get the entire two patterns: cap and visor.
The seam at the top cap gives the rounded shape of the head. And this is the way I've sewn the string. This is my way but you can do it in other ways as you can see in pics below. I've used elastic.
The string should be as long as your dog needs.
A few pictures of caps:
Download free dog cap patterns in three sizes below:
Important: please read this before printing the patterns: