Make a Reverse Polish Notation calculator with variables that works on ints with unlimited precision. Really I should say unlimited magnitude, ints always have perfect precision. This is an adaptation of the first assignment. One very small adaptation first. Get rid of the dot that marks the end of each formula. Easy. Use getline to read a whole line at once, then make an istringstream out of it. The fail method will tell you when you have reached the end. First create a class that represents ints that can be any size whatsoever so long as the computer has enough memory. You can call them whatever you want, but in this description I'll call them superints. Your class must include these operations, constructors, etc: superint() default constructor, the number should be initialised to 0 superint(const superint & other) an ordinary copy constructor superint(string init) just take the digits from the string ~superint() normal destructor intval() method to return the normal int value that is equal this superint. if the superint is too big to be equal to an int, it doesn't matter what the result is. print(ostream & out) const method to print the superint on any output stream ostream & operator<<(ostream & out, const superint & value) a normal function not part of the class. use print, this just makes it compatible with cout niceprint(ostream & out) const method to print the superint on any output stream, but keeping it readable. After every 50 characters start a new line, and unless it ends immediately after a new line, add a new line at the end superint = superint assignment superint = string again just take the digits from the string istream & operator>>(istream & in, superint & variable) a normal function not part of the class. read a string and use your assignment operator superint + superint superint - superint superint * int superint * superint superint factorial(int n) a normal function not part of the class. compare(const superint & other) const a.compare(b) should return a negative value if a < b, zero if a == b, and a positive > 0 value if a > b. The following are not needed for this assignment negative numbers if an input or result turns out to be negative, it doesn't matter what happens. Your program may even produce a wrong answer without any warning division modulo comparison operators < > != etc BUT division and negatives will be required for a future assignment. Perhaps it would be a good idea to begin an attempt while this assignment is still fresh in your mind. Make a new version of your reverse polish notation calculator and make it work on superints instead of doubles. It should be a quick edit. You can remove any of the operations that are not needed or are not appropriate for integer values. Use the niceprint method to print the final result of each formula, otherwise it will be very difficult to compare your results with my samples. Add the word ? as an operator. It should pop two superints from the stack, compare them with your compare method, convert the resulting int to a superint, and push it on the stack. Because you don't need to handle negatives, you will need to change the value. Make less result in 0, equal result in 1, and greater result in 2. When the value of a formula has been calculated, leave out the "result is" from the first assignment, and just use niceprint to display the result. That will make it easier for you to compare your results with my samples. Remember: crash-proof and fool-proof. Here are some samples. Don't just test your program on these samples, check that it all works properly. These are so that you have some known correct results to compare with. Your submission must test every operation, so you can't just run these samples and be done with it. No unnecessary prompts, just let the user type the formula. > 6 7 * 42 > 123456789 1000000000 * 987654321 + 123456789987654321 > 1234567890987654321 98765432123456789 * 121932631239140373304069513112635269 > 1234567890987654321 98765432123456789 * = x 121932631239140373304069513112635269 > x x x x x * * * * 26952541827573725347609849332471321480116658082186 81396973277777813834161754888006304946743521403709 66158920623973236113349974818814789311129902976638 44320527565369571493927349 > x x x x x * * * * = y 26952541827573725347609849332471321480116658082186 81396973277777813834161754888006304946743521403709 66158920623973236113349974818814789311129902976638 44320527565369571493927349 > y y y y y * * * * 14223243444306120405125411015563958620192657104406 76170972856025213225826222090088597482518155121301 97343735454384023902682342592801048803236256939254 91864756926501059749222061463917835336570208403634 24289554706837536909879480513634061180818497866258 81117426910233344852705624031086610466305968611830 90724406065933254538155339963322734515941343269864 46059127116290575984477790110095039822153336725796 18658751974443936354276332314871403808468502545553 89319956534396375049245624391216344648502141985114 88328443456321199243373689090214952587180470769131 46965731550715052131027765775571987398749427386732 20744294920602767146835017008918625112503764854279 87582540528330162734946133881747756818723081238510 73429376900921597309262426915126511309994604685410 85718237706799187745297329233678668978839583511256 26279123179265028542080682079804210649466716044467 8782328891731189221749411749 > 99999999999999999999999999999999997 3 + 100000000000000000000000000000000000 > 1234567890987654321 987654320 - 1 - 1234567890000000000 > 1000 ! 40238726007709377354370243392300398571937486421071 46325437999104299385123986290205920442084869694048 00479988610197196058631666872994808558901323829669 94459099742450408707375991882362772718873251977950 59509952761208749754624970436014182780946464962910 56393887437886487337119181045825783647849977012476 63288983595573543251318532395846307555740911426241 74743493475534286465766116677973966688202912073791 43853719588249808126867838374559731746136085379534 52422158659320192809087829730843139284440328123155 86110369768013573042161687476096758713483120254785 89320767169132448426236131412508780208000261683151 02734182797770478463586817016436502415369139828126 48102130927612448963599287051149649754199093422215 66832572080821333186116811553615836546984046708975 60290095053761647584772842188967964624494516076535 34081989013854424879849599533191017233555566021394 50399736280750137837615307127761926849034352625200 01588853514733161170210396817592151090778801939317 81141945452572238655414610628921879602238389714760 88506276862967146674697562911234082439208160153780 88989396451826324367161676217916890977991190375403 12746222899880051954444142820121873617459926429565 81746628302955570299024324153181617210465832036786 90611726015878352075151628422554026517048330422614 39742869330616908979684825901254583271682264580665 26769958652682272807075781391858178889652208164348 34482599326604336766017699961283186078838615027946 59551311565520360939881806121385586003014356945272 24206344631797460594682573103790084024432438465657 24501440282188525247093519062092902313649327349756 55139587205596542287497740114133469627154228458623 77387538230483865688976461927383814900140767310446 64025989949022222176590433990188601856652648506179 97023561938970178600408118897299183110211712298459 01641921068884387121855646124960798722908519296819 37238864261483965738229112312502418664935314397013 74285319266498753372189406942814341185201580141233 44828015051399694290153483077644569099073152433278 28826986460278986432113908350621709500259738986355 42771967428222487575867657523442202075736305694988 25087968928162753848863396909959826280956121450994 87170124451646126037902930912088908694202851064018 21543994571568059418727489980942547421735824010636 77404595741785160829230135358081840096996372524230 56085590370062427124341690900415369010593398383577 79394109700277534720000000000000000000000000000000 00000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000 000000000000000000 > 99 1 + 100 > 9 9 * 8 8 * ? 2 > 6 3 2 1 + + / 4 + Error: division by zero >