C++

Guys I am trying to do the project on Vending machine but my project should include all of those below criteria. Is there any suggestion on project topic which will have all the following things.
The project should demonstrate:
• Header files
• Abstract Class
• Subclasses
• Virtual function (in addition to the pure virtual function)
• Inheritance
• Polymorphism
• Pointers
• Static variables
• Static functions
• Exceptions
• Templates
• The file I/O
• Overloaded << or >> operator
• Overloaded operators (at least one additional)
goodness.

At a guess, you may have to force-fit some of this just to meet the requirements. You can always bloat a design (sigh) to have more crap that you don't need.

a classic vending machine project would use a finite state machine to deal with the currency input. When the state reaches certain points you have enough to buy a product and issue change if necessary. So your money handler can be a simple FSM class and its own entire thing.

you also have products to vendor, so you need to track your inventory of what you have sold out of, what you have to offer, etc.

you might make up some sort of high tech interface, a touch-screen interface, credit card handler, or phone interface etc to bloat the design to get more stuff in it.

so some interface to the machine has overloaded >> << operators.
some product class can inherit something
fsm class might have pointers to track its states (a graphish type structure, but it won't be that complex, it is probably a static structure)
and so on..
Just keep adding features and bloat until you cover all the requirements. Not exactly the best way to really design something, but the requirements are insane, and insane requirements lead to insane designs (in the real world too).



thanks jonnin
Topic archived. No new replies allowed.