[一(X)就(Y)] is a very common sentence structure
(X) is the condition or requirement. When this condition or requirement is met, then the following action or event (Y) would occur.
Depend on the context [一(X)就(Y)] functions as following:
- [once (X) then / immediately (Y) ]
Example: [一(吃完飯)就(出去)] = [once I (finish dinner), then I would (go out )immediately]
吃完飯 is the condition / requirement that being met; 出去 is the following action that only occurs after the condition is met.
- [Whenever (X) then / immediately (Y) ]
Example: [一(上課)就(睡覺)]= [ whenever I ( go to classes), I would immediately (fall to sleep)]
上課 is the condition/ requirement that being met; 睡覺 is the resulting action/event that always occur when the condition/ requirement is met.
can i say "我一吃了饭就出去了?"
If by saying "一吃了", you meant 'once I finish eating', you can say "我一吃了饭就出去了". But it is better to say "我一吃完饭就出去了" (once I finish dinner, I would go out). Because "一吃了" in "我一吃了饭" can also be interpreted as "whenever I eaten dinner".
You didn't mean to say "I go out whenever I eaten dinner" I suppose?
As for your example sentences:
今天我一下课就去看他 - (下课=X; 去看他=Y ) "Once I finished classes for today, I went to see him immediately."
他一到中国就给我来了个电话- (到中国=X; 给我来了个电话=Y)" Once he arrived in China, he immediately gave me a phone call."
姐姐一毕业就参加工作了- (毕业=X; 参加工作=Y) " Once my sister graduated, she joined the work force immediately.)