Hey first post of the forums, sorry if I break any rules!
Basically I have to create a program that will store values for 'Cans' and 'Tokens'. Simple vending machine like program, where the user inserts 2 tokens and gets 1 can.
I've only been doing java for about 3 weeks, and still trying to get my head around constructors, objects and classes etc. I'm not sure exactly how to go about writing the constructor.
I know it makes an instance of the class, but how should I write this in the code?
Thanks!
Basically I have to create a program that will store values for 'Cans' and 'Tokens'. Simple vending machine like program, where the user inserts 2 tokens and gets 1 can.
I've only been doing java for about 3 weeks, and still trying to get my head around constructors, objects and classes etc. I'm not sure exactly how to go about writing the constructor.
I know it makes an instance of the class, but how should I write this in the code?
Thanks!