Updated program to use makeLabel() and makeLine() methods