University Calculus: Early Transcendentals (3rd Edition)

$\mathrm{See\:the\:graph\:below.}$ The first piece of the function is represented in red and the second in blue.
Graph the function $\ y=1-x\$ and apply the constraint $\ [0,1].$ After that, graph the second piece of the function $\ y=2-x\$ and apply the constraint $\ (1,2].$ You may notice that the empty circle at point $\ (1,1)\$ indicates that the point in not included in the domain.