Specific heat problems I am in need of help for my understanding in specific heat capacity. To be honest, I understand the lesson effectively, However, just a few days ago, I've encountered two similar yet different-in-approach problems. Here are the problems:
1.) A sample of gold was dropped to a glass of water. The water had a given initial temperature that was higher than the gold. Eventually, a final temperature for both elements were given. The problem was asking for the mass of the gold?

The solution showed to me that the heat of the gold (qgold) released is equal to the heat of water (qwater) absorbed.

qgold = -qwater

Now, I can see that the glass which served as the container of the water was not included in the equation. As far as I can get the logic of this, the second problem seemed to have a different approach but this time the container is involved in the heat transfer. Now this is the second problem:

2.) An unknown sample with a given mass and given initial temperature was dropped to a can with water. The can and the water had a similar initial temperature, but the two had a different mass. The final temperature of all elements present in this problem was given. The problem was asking for the specific heat of this unknown sample. The thing is, this is the part where I am a bit confused because the solution given to me was this:

q of unknown substance = q of the can + q of water

Now, what I really want to ask is this: When do I consider including the heat of the container of the system in this type of problem, as it is very situational in this case? My professor told me it's about material thing. However, I seem to not deem my professor's explanation to be sufficient, for I know a better explanation could be given. 

I hope I would get a very comprehensive reply as soon as possible.

Thank you!
There are often some unstated simplifying assumptions in questions of this kind. For example, in both cases, no account is taken of heat transfer to the surroundings (the air?). Unless the system is isolated, one expects that eventually the system would reach the temperature of the surroundings. However, it is hardly worth stating this explicitly: our common experience is that we can neglect the transfer of heat to the surroundings, on the timescale of the experiment, because it happens comparatively slowly.

In the examples you give, some similar assumptions may apply. If you have a metal can, perhaps not very thick (low overall thermal capacity) and of high thermal conductivity, it's a reasonable assumption that it comes to thermal equilibrium with the contained liquid fairly quickly. On the other hand, for a glass, with lower thermal conductivity, it may be a reasonable approximation that no heat is transferred to it on the timescale of the experiment.

It is, as you say, situation-dependent: it depends on the material properties of the container. It would be most helpful if problems of this kind made it clear what you should assume. Alternatively you may be able to deduce what to assume, from the data provided (or not provided). Or indeed, perhaps it is expected that you can make the right assumptions, knowing something about the materials concerned.