Hast du gestern ein nützliches Buch gekauft?
I know when it comes to declension of adjectives in German, they tend to wear pretty much the same case form as that of their preceding articles such as, "Der kleine Hund ist schön." or "Ich bin heute Morgen aus dem tiefen Schlaf aufgewacht.".
Nevertheless, indefinite and possessive articles tend to have some exceptions to their rules, that for example in case of neutral nouns in the accusative position, -es is attached to the end of the preceding modifying adjective.
I have just started learning German as my third language, and in as much as I have always been so pernickety about proper application of grammatical rules, I would like to ensure that what I produce is syntactically sound and good and I do appreciate your time and effort to elucidate what might seem so elementary and easy to know.