Those ～ものだ and ～ことだ are a kind of set phrase. The structure ～ものだ expresses that "it's natural/obvious/reasonable that ~", i.e., this expression has a sense of "as a common sense/generally speaking". ～ことだ has a similar meaning to ～ものだ, but this shows that ~ is the speaker's personal advice.
大人の言うことはよく聞くものだ。 It stands to reason to listen to the advice of adults. = You should obey adults (as a common sense).
「自分はもう子供ではない」という事を強く頭に入れることだ。 You should strongly put the idea into your mind that "you aren't a child anymore" (as my personal advice).