According to my Aussie teacher these sentences are right:
I have a dog, he is a York.
The dog is good.
But these aren't:
I have a friend, he is my classmate.
The friend is good.
But what's the difference?
Source: My mind
"Good dog!" is a common expression when talking to animals. So "Good cat!" or "Good horse" are fine, but it would be condescending when talking to people. Of course you could use say something like, "Good human!" for humorous effect, but not in ordinary conversation.
For example, this is a typical conversation between me and my brother's dog:
Who's a good dog? Who's a good dog? Yes, you're a good dog, aren't you? He's a good dog, yes!
Anyway, "The dog is good" sounds odd. "He's a good dog" is more natural
I have a dog, he's a York. He's a good dog.
but with this structure, "He's a good friend" would be fine.
A: Who is that guy I saw you talking to at the party?
B: Oh, he's a good friend. I've known him since we were kids.
The word "good" has several possible meanings; for a dog, it generally means "well-behaved."
We can use that sense of the word for humans, too. For example, She's a good person could mean that she's well-mannered or charitable – but I don't think we'd use that word quite the way you do. We could say:
I have a friend, he is my classmate. My friend is a good guy.
By this, you are saying that he's a good influence. Perhaps he encourages you to study hard, or maybe he's nice to everyone he meets.
Alternatively, you might say:
I have a friend, he is my classmate. He is a good friend.
By this, you mean he embodies the qualities of friendship (that is, he might be loyal, kind, friendly, reliable, and supportive).
Grammatically, there's nothing wrong with what you wrote, but it does read quite awkwardly.
"The friend is good" is a bit impersonal for describing a friend (which is why I changed The friend to My friend in my first example); moreover, "good" is too vague in the context of "The friend is good," which is why my sentences specify what is good (i.e., him as a person, or him as a friend).