If in front of the adjective you find a definite article (der, die, das,...), the definite article "carries" the information about the gender, number and the case. The rules are the simplest:
M
F
N
Pl
N
-e
-e
-e
-en
A
-en
-e
-e
-en
D
-en
-en
-en
-en
G
-en
-en
-en
-en
If in front of the adjective you find an indefinite article ein, negation article kein:
M
F
N
Pl
N
-er
-e
-es
-en
A
-en
-e
-es
-en
D
-en
-en
-en
-en
G
-en
-en
-en
-en
If in front of the adjective there is no article, the adjective has to "carry" all the information about the gener, number and the case. The suffixes resemble the most the suffixes for declension of definite articles: