Judgment by default may be entered as follows:
(a) By the clerk. — When the plaintiff’s claim against a defendant is for a sum certain or for a sum which can by computation be made certain, the clerk upon request of the plaintiff and upon affidavit of the amount due shall enter judgment for that amount and costs against the defendant, if he has been defaulted, and if he is not an infant or incompetent person.
(b) By the court. — In all other cases the party entitled to a judgment by default shall apply to the court therefor; but no judgment by default shall be entered against an infant or incompetent person unless represented in the action by the father, mother, guardian, guardian ad litem or other such representative who has appeared therein. If, in order to enable the court to enter judgment or to carry it into effect, it is necessary to take an account or to determine the amount of damages or to establish the truth of any averment by evidence or to make an investigation of any other matter, the court shall hold such hearings or order such references as it deems necessary and proper. When the party against whom judgment by default is sought has appeared in the action, it shall be served with written notice of any hearing by default to be held.