Question
I need to create a calculator class that reads from a .txt file ad produces the operands and numbers in the file. For example if
I need to create a calculator class that reads from a .txt file ad produces the operands and numbers in the file. For example if the .txt file has "2 8 +" then the calculator class needs to read thsat file and produce an output like "2 + 8 = 10". This class needs a driver class as well. So in total i need a: .txt file, calculator.java , calculatorDriver.java. I will have a UMF diagram at the bottom showing what i need in the code. Also what I have learned about using a file is "file f = new file ("example.txt")", then "Scanner input = new Scanner (f)" Thank you!
Calculator int op1 int op2 -char operation +galculator (int op1, int op2, char operation) accessor +mutator +equals +ToString +add +subtract +Divide +multiplv. +remainder +Absolute value
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started