The subject of a sentence, the noun that the sentence is about, is in the nominative case. In the nominative case, masculine is ein, feminine is eine, neuter is ein.
In this sentence, "Er" is the subject, so it's in the nominative case.
We use "einen Hund" instead of "ein Hund" because he is doing something (haben) to the dog so it's the direct object and is in the accusative case. Only the masculine changes in the accusative case, from ein to einen.
Because of the gender. Hund is masculine, so it takes 'einen' in the Accusative case. Einen being the accusative indefinite article. Neuter and feminine nouns dont transform their indefinite articles they remain, the same in the accusative case, i.e ein for neuter and eine for feminine.
What if the dog is a female dog? As in Spanish, if we are referring to a female animal, we would change the word and the article.
El perro=The dog (m) --- La perra (f) Notice that both the nouns and the articles changed.
In German, there exists genders for words; so I wonder if, as in Spanish (which also has genders for words), the noun and article change in German.
You posted your question some time ago, but I don't see anything in this thread that directly addresses it, so let me share with you what I read in another thread:
The animal's gender has nothing to do with the noun's gender. You can have a male cat, but it is still 'Die Katze', because the noun itself is feminine. So when it comes to cases, just disregard the sex of the animal.
The excerpt above is from a user who goes by ELXR. It comes from the discussion thread for:
Along those same lines, "das Mädchen" is still referring to a girl (which is female in gender), but the gender of the noun remains neuter. It is my understanding, however, that one should use "she," or "her," to refer to a "Mädchen." Some examples follow:
The girl is eating an apple.
Das Mädchen isst einen Apfel.
She is hungry. (Not "it" is hungry.)
Sie ist hungrig. (Not "es" ist hungrig.)
The girl is eating her apple.
Das Mädchen isst ihren Apfel.
But, you still need to have noun-adjective agreement when using the word "Mädchen." For example:
The hungry girl is eating an apple.
Das hungrige Mädchen isst einen Apfel.
Hard to see what I'm trying to teach here because both feminine and neuter adjectives take an "e" ending after the definite article (for the nominative and accusative cases), which is "die" for feminine or "das" for neuter. So, let me show you one more example:
She is a good girl.
Sie ist ein gutes Mädchen.
"Sie ist eine gute Mädchen," would be incorrect because "eine gute" is the combination you would use for a feminine noun. The indefinite article "ein" is used with neuter nouns in nominative and accusative case and adjectives that decline for neuter nouns take an "-es" for nominative and accusative case.
Now does this work the same way with dogs, cats and other pets? Good question. I'm not 100% sure on this. It seems to depend on whom you ask. I came to that conclusion after reading the following discussion thread at German Language StackExchange:
After reading through it, you can then make your own decision about whether to refer to a female dog with the masculine or a male cat with the feminine. At least you'll know why you're doing it. For duolingo purposes, however, I would go with the grammatical gender of an animal rather than the biological gender. It is likely that you won't be given enough contextual clues to know otherwise, so it should be relatively easy to just go with the grammatical gender.
Also, if anyone disagrees with anything I've written in this post, please let us know.