Assignments
-
EAN Processor - Procedural Version
-
EAN Processor - Object Version
- Order Processor
- Order Processor with Special Orders
|
GS1 Prefix
Table |
Grading Policy for A3, A4 (Summer 2014)
1. You will receive 80% of the marks if your code works correctly with
a3test.cpp and a3main.cpp and a4test.cpp and a4main.cpp.
2. You will receive 89% of the marks if you have created concise code structures
and excellent documentation.
a) You should refactor redundant code into functions. (For example, the
constructors should call a setter. A function is called to allocate memory
dynamically.)
b) You should simplify loop structures as much as possible. (For example, use
the modulus operator (%) instead of of loop to extract a digit from a
number.)
c) You should use a for-loop to implement a fixed iteration. You should use a
while-loop or a d-while loop for an indefinite iteration.
d) You should not declare a data member that could be declared as a local
variable in a member function.
e) You should use descriptive names in varialble declarations. (For example,
balance vs b.)
f) You should use the #define directive to define the maximum size of an
array.
g) You should provide grammatically-correct comments to explain your
programming logic.
h) You should use indentation and blank lines to make your code readable.
3. You will receive 100% of the marks if you have created an enhanced version of
a3main.cpp that does robust input validation. For example, your enhanced main
program will validate the following input:
EAN (0 to quit) : 978907ABC2046
>>> error message: BAD DATA FORMAT
EAN (0 to quit) : 9789070002046
Quantity (0 to quit) : 25xyz
>>> error message: BAD DATA FORMAT
Quantity (0 to quit) : 25
|
|
|
|