I made a calculator program but I'm required to include inheritance and composition, stack/queue/linked list and operator overloading or template
make it work for variable number of input (not only two numbers) using linked lists, don't define the numbers as float but create a template based class number and sub classes which will inherit the basic one, overloaded operators for every kind of operation.It is chaos i know, but as you start programming it won't look that difficult..Good luck
thanks @infinity_ , how would I set up the statement for variable number of input? like var x var y ? I you could type an example it would help, thanks again
you can either implement a linked list, or knowing the operation, keep each number in one variable, and perform *=,+=,-=,/= in an other..in the end you just output the other variable
Join our real-time social learning platform and learn together with your friends!