A child over the age of sixteen may petition a court to be declared emancipated. The parents or custodians shall be made respondents and, in addition to personal service thereon, there shall be publication as a Class II legal advertisement in compliance with the provisions of article three, chapter fifty- nine of this code. Upon a showing that such child can provide for his physical and financial well-being and has the ability to make decisions for himself the court may for good cause shown declare the child emancipated. The child shall thereafter have full capacity to contract in his own right and the parents or custodians shall have no right to the custody and control of such child or duty to provide the child with care and financial support. A child over the age of sixteen years who marries shall be emancipated by operation of law. An emancipated child shall have all of the privileges, rights and duties of an adult, including the right of contract, except that such child shall remain a child as defined for the purposes of articles five and five-a of this chapter.