"A German child eats fruit."
Translation:Ein deutsches Kind isst Obst.
"deutsch" is an adjective in this sentence. The ending of an attributive adjective depends on several factors, namely on the kind of article used (here: ein) and on the gender/case/number (= singular/plural) of the noun (here: "Kind" is neuter, nominative, singular).
For more information, see: http://coerll.utexas.edu/gg/gr/index.html?si=adj
'Deutsche' is like "Deutsch + die" and 'Deutsches' is like "Deutsch + das" (In my understanding)
No - there is no genitive case in this sentence.
1) You're right that the ending -(e)s is added to masculine and neuter nouns in the genitive case: "des Kindes" (of the child; the child's), "des Mannes" (of the man; the man's), etc. The -es also appears in the articles of masculine and neuter mouns in the genitive case: "DES Kindes" "EINES Kindes".
2) However, in the phrase "ein deutsches Kind", "deutsches" is not a noun or an article. It's an adjective. The rules for nouns, articles and adjectives are different.
In the sentence "Ein deutsches Kind isst Obst" (A German child eats fruit), the attributive adjective "deutsches" describes the noun "Kind".
a) "Kind" is used with the indefinite article "ein" ("a") = the so-called "mixed inflection" for adjectives is used
b) "Kind" is neuter (singular).
c) "Kind" is nominative (because it's the subject, and the subject is always in the nominative case).
Because of these three factors (mixed inflection, neuter, nominative), the attributive adjective ending is -es: deutsch-es.
what if the sentence is " a german man eats fruit"? will it be "deutscher Mann isst Obst"?