Example Report

Hi everybody,

I've copied an example of the program test report for assignment 4 below. For those of you who had trouble getting your programs to work well, you could have a look at the output of this assignment. Please also let me know if you need an example implementation.

I've included below the contents of the files that I used to test your programs. The contents are shown at the top of the Test Results section. By comparing your program's output with the contents of these files, it should be clear what the calculated results should have been and what errors should have been handled. I tested your programs more harshly than I scored them. Failing to pass some of these tests will not lead to points deduction.

If you submitted your assignment 4, by the end of today, you will have received an email from me with your report. If you haven't received the email by the end of today, let me know. Also let me know if you have any questions regarding your score.

Cheers!
Jade


Here is your score for Assignment 4.

Score: TBD%

Let me know if you have any questions regarding your score. And let me know if you want a copy of an example implementation for the assignment.

Regards,
Jade

Grading Guildelines


Test Results

The following files were used during in the tests:

% java ChengJade4 Calculations.txt
'9-8' = 1 '1 + 1' = 2 '7 / 2' = 3 '1 + 6 / 2' = 4 '2 * 3 - 1' = 5 '5 + 5 - 2 * 2' = 6 '8 / 2 + 9 / 3' = 7 '2 * 2 * 2' = 8 '1 + 2 * 3 + 2' = 9 '2 * 6 - 1 * 2' = 10
% java ChengJade4 Precedence.txt
'3 + 2 * 3 - 9' = 0 '6 + 9 / 3 - 9' = 0 '9 + 9 % 9 - 9' = 0 '8 + 4 - 3 - 9' = 0 '0 - 3 * 3 + 9' = 0 '3 - 6 / 3 - 1' = 0 '9 - 9 % 9 - 9' = 0 '4 - 3 + 8 - 9' = 0 '2 * 3 + 3 - 9' = 0 '3 * 4 - 3 - 9' = 0 '9 / 3 + 6 - 9' = 0 '9 / 3 - 2 - 1' = 0 '9 % 9 + 9 - 9' = 0 '9 % 9 - 9 + 9' = 0
% java ChengJade4 1.txt
'1' = 1
% java ChengJade4
usage: ChengJade4 <path>
% java ChengJade4 Calculations.txt Bad-Path.txt
usage: ChengJade4 <path>
% java ChengJade4 Bad-Path.txt
Bad-Path.txt (The system cannot find the file specified)
% java ChengJade4 Blank-Lines.txt
'1+1' = 2 Error on line '': Not enough operators.
% java ChengJade4 No-EOL.txt
'1+1' = 2
% java ChengJade4 MUL.txt
Error on line '*': The stack is empty.
% java ChengJade4 1-A-2.txt
Error on line '1 A 2': Invalid character: 'A'
% java ChengJade4 1-ADD-2-3-ADD-4.txt
Error on line '1 + 2 3 + 4': Not enough operators.
% java ChengJade4 1-DIV-0.txt
Error on line '1 / 0': Division by zero.
% java ChengJade4 1-MOD-0.txt
Error on line '1 % 0': Division by zero.
% java ChengJade4 8-EXP-11.txt
Error on line '8*8*8*8*8*8*8*8*8*8*8': Integer overflow encountered: 8589934592
% java ChengJade4 SUB-1-ADD-2.txt
Error on line '-1+2': The stack is empty.
Valid HTML 4.01 Valid CSS