class A
{
public test(){print(1);}
}

このA->test()の中に書いた処理を別のファイルから書き換えたいんですけど
こういうときのオブジェクト思考のやりかたを教えてください