A is knocked down by a car, and is found by B. B takes the unconscious A to the doctor C, who offers treatment. Once he regains his health, A may refuse to pay C, stating that there is no agreement between them. In such cases, the doctrine of quasi contract can be applied by the court, and order the person who has received unjust enrichment to pay the aggrieved party. Here, the remedial measure is imposed by the court, for the sake of justice. So, it is termed implied-in-law contract.