I agree with the majority here and think that $40 is not enough to build a complete cabinet despite having the parts on-hand that you've already mentioned. There's a lot of unanticipated parts and components that make up a cabinet. I can tell you from first-hand experience (as I'm sure many others can attest), it seems as though I've spent more time running to and from the hardware store or shopping on-line than I have spent actually working in the shop.
Don't be too discouraged though, because while it does take a little money to get started, the majority of us here who have put hundreds or thousands of dollars into our cabinets didn't do it all in one shot. I for one started buying parts and supplies over two years ago, but didn't start physical construction until this past April. While I planned as best as I could and kept thinking that I had everything I needed to complete the cabinet, there was always one more thing that I didn't take into consideration.
Keep your chin up and remember that most of us have put more time than money into our cabinets. Spend a little now to get you going and work on it when you can. Add a little bit here and there as your budget will allow. While it is possible to economically build a cabinet, you want to also have something in the end that you will be very proud of.