جَاءَ رَجُلٌ صَالِحٌ: rajulun is subject and ṣāliḥun is its nominative adjective.
رَأَيْتُ رَجُلًا صَالِحًا: rajulan is object and ṣāliḥan is its accusative adjective.
سَلَّمْتُ عَلَى رَجُلٍ صَالِحٍ: both noun and adjective are genitive after ʿalā.
These teaching examples demonstrate that the adjective shares the noun’s case.