As a 終助詞(しゅうじょし) (sentence ending particle), こと has two primary functions. These are as follows:
願望(がんぼう)や軽(かる)い命令(めいれい)
を表(あらわ)す - Highlighting a desire or weak command.
感嘆(かんたん)や疑問(ぎもん)
を表(あらわ)す - Highlighting astonishment or doubt.
We will focus on the first meaning in this grammar point, as the ‘astonishment’ nuance is not as commonly used in modern Japanese, and is primarily used only by women.
At the end of a sentence, こと will be paired with the dictionary (or ない) form of a verb, to highlight a particular action that either should, or should not occur. It is usually grouped with the 助動詞(じょどうし) (auxiliary verb)
だ, although this is not always the case. This construction is most often translated as ‘should/should not (A)’, or ‘ought to/not (A)’.
-
面倒(めんど)くさくても朝(あさ)ご飯(はん)を食(た)べることだ。
Even though it might be a pain, you should eat breakfast.
明日(あした)の朝(あさ)8時(じ)から試験(しけん)が始(はじ)まる。何(なに)があっても、時間(じかん)通(どお)りに来(く)ることだ。みんな、分(わ)かったか。
The exams will begin tomorrow at 8 am. No matter what happens, you should come on time. Understood?
どんなに疲(つか)れていても諦(あきら)めないことだ。
You should not give up, no matter how tired you are.
怪我(けが)をしたら、我慢(がまん)をしないことだ。すぐ責任者(せきにんしゃ)に報告(ほうこく)するように。
If you get hurt, you shouldn’t just suffer in silence. Immediately call your supervisor.
This use of こと implies a certain level of ‘authority’, and is therefore regularly used in relation to set rules and expectations (can very frequently be seen on signs in shops/parks, etc). Due to this, it should not be used when giving ‘general’ advice, especially to people of higher status.