Project 5
Scientific Calculator with History:
Reoprt:
Code of Scientific Calculator is written Successfully. Code is attached as a zip file.
This code can perform all the operations mentioned above.
As per the way of code written, it is written in a single class file.
The Operations are selected by user through "Switch-Case".
The Switch and all the cases are inside a While loop for continuous operation untill user breaks.
Try catch blocks are used for uninterrupted compiling.
Try catch block is used for "operation 19 - binary to decimal conversion", as input should be in 0's and 1's.
For Storing and recalling a number created s seperate file(StoreRecall.txt) and read it from the file and print it into the console.For this Buffered writer and Buffered reader is used.
SIP calculations are made for yearly basis.
Finally for storing Calculations history a new file is created(CalculationsHistory.txt). Used PrintWriter for the output to write into the file.
***To save the output to the file, loop should break which inturn closes the writer.for breaking the loop choose the option 0(zero)(or any number other than 1-21)***
Added a new operation 21, which simply prints the history of calculations to the console.
Exception handling is done properly by throwing exception and using try catch blocks.