Question: Using either Java or C + + ( one of these object - oriented languages ) , design and write a program as specified below:Read

Using either Java or C++(one of these object-oriented languages), design and write a program as specified below:Read a file containing arithmetic expressions (test.txt), calculate the answers, and print both the original expressions and their results. The numbers in the expressions include both integers and fractions. If there are fractions in the expression, the answer should be displayed in its simplest fractional form.Example of the problem file (test.txt):4+2-2/3=3-5+2+3/2+1/2+2=1/2-1/3+1/4+1=6=3-4/5=Expected output format:4+2-2/3=16/33-5+2+3/2+1/2+2=41/2-1/3+1/4+1=17/126=63-4/5=11/5Requirements
:1.(5 points) Draw a class diagram for your program, including attributes and major methods.
2.(15 points) Program functionality and correctness: The program should correctly produce answers as shown in the example, as well as for other similar arithmetic expressions. It should adhere to object-oriented design principles, correctly read from the input file, output the correct results, and include error handling (e.g., file not found, division by zero).
3.(5 points) Program readability: This includes naming conventions for parts of the code and using comments to explain your design or clarify parts of the code. Comments should be in English.
Using either Java or C + + ( one of these object

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!