In our class we use the following definition of connectedness of topological spaces.
I'm trying to carry out the analysis for the following case.
For a fixed $n \in \mathbb{Z}^+$, let $A = \{\frac{1}{n}\} \times [0,1]$ and $B = X \setminus A$. Then $\overline{A} \cap B = \emptyset$ and $\overline{B} \cap A = \emptyset$.
On the other hand, if we let $C = \{(0,0),(0,1)\}$ and $D = X \setminus C$, then $C \cap \overline{D} \neq \emptyset$.
How should I answer the question about connected components based on the above information? The decomposition of X into C and D seem to be connected, but D itself is not because of the information previously stated.
Also, regardless of the answer to that, I assume the path-connected components of X are just the "vertical lines" A's?


The vertical lines $A_n=\{\frac1n\} \times [0,1]$ are path-connected and so connected (assuming you did cover that). These indeed are components and path-components of $X$. The singletons $\{(0,0)\}$ and $\{(1,1)\}$ are also maximally (path-) connected and form the remaining (path-)components. Your $C$ is not connected as it consists of two disjoint closed sets (the singletons).