marking4/output
author Christian Urban <urbanc@in.tum.de>
Sat, 02 Feb 2019 13:35:07 +0000
changeset 262 21c69dc3dbf7
parent 257 ba4d976ca88d
child 288 65731df141a5
permissions -rw-r--r--
updated
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
257
ba4d976ca88d updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     1
ba4d976ca88d updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     2
Below is the feedback and provisional marks for your submission
ba4d976ca88d updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     3
for assignment 9 Part 2.  Please note all marks are provisional until
ba4d976ca88d updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     4
ratified by the assessment board -- this is not an official
ba4d976ca88d updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     5
results transcript.
ba4d976ca88d updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     6
ba4d976ca88d updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     7
postfix.scala does not contain vars, returns, Arrays, ListBuffers etc?
ba4d976ca88d updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     8
  --> success
ba4d976ca88d updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     9
postfix.scala runs?
ba4d976ca88d updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    10
  --> success
ba4d976ca88d updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    11
 syard(split("3 + 4 * ( 2 - 1 )")) == List("3", "4", "2", "1", "-", "\*", "+")
ba4d976ca88d updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    12
 syard(split("( ( ( 3 ) ) + ( ( 4 + ( 5 ) ) ) )")) == List("3", "4", "5", "+", "+")
ba4d976ca88d updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    13
 syard(split("5 + 7 / 2")) == List("5", "7", "2", "/", "+")
ba4d976ca88d updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    14
 syard(split("5 * 7 / 2")) == List("5", "7", "\*", "2", "/")
ba4d976ca88d updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    15
  --> success
ba4d976ca88d updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    16
 compute(syard(split("3 + 4 * ( 2 - 1 )"))) == 7
ba4d976ca88d updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    17
 compute(syard(split("10 + 12 * 33"))) == 406
ba4d976ca88d updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    18
 compute(syard(split("( 5 + 7 ) * 2"))) == 24
ba4d976ca88d updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    19
 compute(syard(split("5 + 7 / 2"))) == 8
ba4d976ca88d updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    20
 compute(syard(split("5 * 7 / 2"))) == 17
ba4d976ca88d updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    21
 compute(syard(split("9 + 24 / ( 7 - 3 )"))) == 15
ba4d976ca88d updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    22
  --> success
ba4d976ca88d updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    23
postfix2.scala does not contain vars, returns, Arrays, ListBuffers etc?
ba4d976ca88d updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    24
  --> success
ba4d976ca88d updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    25
postfix2.scala runs?
ba4d976ca88d updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    26
  --> success
ba4d976ca88d updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    27
 syard(split("3 + 4 * ( 2 - 1 )")) == List("3", "4", "2", "1", "-", "\*", "+")
ba4d976ca88d updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    28
 syard(split("( ( ( 3 ) ) + ( ( 4 + ( 5 ) ) ) )")) == List("3", "4", "5", "+", "+")
ba4d976ca88d updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    29
 syard(split("5 + 7 / 2")) == List("5", "7", "2", "/", "+")
ba4d976ca88d updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    30
 syard(split("5 * 7 / 2")) == List("5", "7", "\*", "2", "/")
ba4d976ca88d updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    31
 syard(split("3 + 4 * 8 / ( 5 - 1 ) ^ 2 ^ 3")) == 
ba4d976ca88d updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    32
         List("3", "4", "8", "\*", "5", "1", "-", "2", "3", "^", "^", "/", "+")
ba4d976ca88d updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    33
 
ba4d976ca88d updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    34
 compute(syard(split("3 + 4 * ( 2 - 1 )"))) == 7
ba4d976ca88d updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    35
 compute(syard(split("10 + 12 * 33"))) == 406
ba4d976ca88d updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    36
 compute(syard(split("( 5 + 7 ) * 2"))) == 24
ba4d976ca88d updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    37
 compute(syard(split("5 + 7 / 2"))) == 8
ba4d976ca88d updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    38
 compute(syard(split("5 * 7 / 2"))) == 17
ba4d976ca88d updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    39
 compute(syard(split("9 + 24 / ( 7 - 3 )"))) == 15
ba4d976ca88d updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    40
 compute(syard(split("4 ^ 3 ^ 2"))) == 262144
ba4d976ca88d updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    41
 compute(syard(split("4 ^ ( 3 ^ 2 )"))) == 262144
ba4d976ca88d updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    42
 compute(syard(split("( 4 ^ 3 ) ^ 2"))) == 4096
ba4d976ca88d updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    43
 compute(syard(split("( 3 + 1 ) ^ 2 ^ 3"))) == 65536
ba4d976ca88d updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    44
  --> success
ba4d976ca88d updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    45
Overall mark for CW 9, Part 2
ba4d976ca88d updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    46
4