Ask your own question, for FREE!
Computer Science 9 Online
OpenStudy (anonymous):

I made a calculator program but I'm required to include inheritance and composition, stack/queue/linked list and operator overloading or template

OpenStudy (anonymous):

OpenStudy (anonymous):

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

OpenStudy (anonymous):

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

OpenStudy (anonymous):

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

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Latest Questions
Arriyanalol: i need help
1 day ago 7 Replies 1 Medal
Arriyanalol: CONGRATS to me
1 day ago 8 Replies 2 Medals
Legomaster346: What colleges are good that are near Arab Alabama?
1 week ago 5 Replies 0 Medals
Arriyanalol: i need help
1 week ago 6 Replies 2 Medals
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!