DFA for exactly two of a and one or more of b I'm totally new to DFA's and automaton in general -- this is the first week or two of class that I've actually seen this -- and I'm curious as to a pattern to match the following: 

"Match the set of all strings on the alphabet {a, b} that have at least one b and exactly 2 a's" 

I've tried to construct a DFA to represent this structure, but I have no idea how to form a structure to count for something and match for one. 

Can someone help? 



Okay, so. Here's what I got and I think it's the right answer.
Since it's for class, I won't actually build the DFA for you, but I will give you a way to look at it that'll help.


As far as $b$s go, you really only care about whether or not you've seen a $b$ so far in the string.
As for $a$s, you care about whether you've seen 0, 1, 2, or more.


Each combination of scenarios for both letters (like "seen none of either" or "seen one of each" or "seen one $a$ and no $b$s") changes in its own way depending on whether you read another $a$ or $b$. How might you express that in a DFA?