How can I join meshes that are separated by dotted lines?
You can easily do this by first enabling Vertex Snapping

select the edges/vertices that you want to join.

Hold Control and move it along the Z.

Then, select all the vertices, you want to join, or simply press A to select them all. Press W and select remove doubles. This will join them so it is a connected mesh.