We consider a one-dimensional system of δ-interacting bosons trapped in harmonic potential. For the repulsive and attractive interaction, we derive expressions of ground-state wave functions, excited-state wavefunctions and their energe eigenvaluess of two-body systems.