Initial commit

This commit is contained in:
Rory Healy 2020-05-16 22:11:19 +10:00
commit 789e415f7b
Signed by: roryhealy
GPG key ID: 0A3CBDE9C2AE672F
7 changed files with 257 additions and 0 deletions

168
docs/project02-rubric.html Executable file
View file

@ -0,0 +1,168 @@
<html>
<head>
<title>COMP10002 Foundations of Algorithms</title>
</head>
<body>
<font size="+2">
<h3>COMP10002 Assignment 2 Feedback: XXUSERNAMEXX</h3>
<p>
<h4>Program Presentation</h4>
Including: layout and style, readability, adherence to coding
expectations, general care and appearance.
<br>
Some subset of the following lines will be retained by the marker.
<p><ul>
<li>Up to Stage 1 initial allocation, +1.
<li>Up to Stage 2 initial allocation, +2.
<li>Up to Stage 3 initial allocation, +3.
<li>Up to Stage 4 initial allocation, +3.
</ul><p>
<i>Deductions</i>
<p>
Some subset of the following lines will be retained by the marker.
Marks in each section won't go below zero.
<p><ul>
<li>#defines not in upper case, -0.5;
<li>absence of function prototypes, -0.5;
<li>bad choice for function names, -0.5;
<li>bad choices for variable names, -0.5;
<li>use of typedefs without "_t", -0.5;
<li>excessive commenting, -0.5;
<li>inconsistent bracket placement, -0.5;
<li>inconsistent indentation, -0.5;
<li>insufficient commenting (at least one comment per function to explain what the function does), -0.5;
<li>lack of whitespace (blank line between functions or code blocks), -0.5;
<li>lines &gt;80 chars, -0.5;
<li>no authorship statement (student name and id at the top of program), -0.5;
<li>use of external code without attribution, -1;
<li>use of magic numbers, -0.5;
<li>other stylistic issue (minor), -0.5;
<li>other stylistic issue (major), -1;
<!-- BEGIN-CHOICES
END-CHOICES -->
</ul><p>
<i>Additions (included in total mark only
if marks lost within this first section)</i>
<p><ul>
<li>comment that says "algorithms are fun", +0.5;
<li>overall care and presentation, +0.5;
</ul><p>
<i>Other Comments from Marker</i><p>
<!-- Replace this line if you wish to add comments -->
<h4>Structure and Approach</h4>
Including: decomposition in to functions, development of data
structures and declaration of them at the appropriate locations,
choice of parameters to functions, use of appropriate <tt>struct</tt>
and
<tt>typedef</tt> declarations, choice of algorithms or methods.
<p>
Some subset of the following lines will be retained by the marker.
<p><ul>
<li>Up to Stage 1 initial allocation, +1.
<li>Up to Stage 2 initial allocation, +2.
<li>Up to Stage 3 initial allocation, +3.
<li>Up to Stage 4 initial allocation, +4.
</ul><p>
<i>Deductions</i>
<br>
Some subset of the following lines will be retained by the marker.
Marks in each section won't go below zero.
<p><ul>
<li>duplicate code segments (e.g., implementing binary search twice), -0.5;
<li>global variables, -0.5;
<li>insufficient use of functions, -0.5;
<li>functions too long (over 50 lines for any function) or too complex, -0.5;
<li>overly complex algorithmic approach, -1;
<li>unnecessary duplication/copying of data, -0.5;
<li>avoidance of typedefs, -0.5;
<li>overly complex function argument lists, -0.5;
<li>using == for equality on doubles, -0.5;
<li>avoidance of structs, -1;
<li>avoidance of pointers to structs, -0.5;
<li>Stage 3 not using a linked data structure, -2;
<li>Stage 4 missing time complexity analysis or time complexity over O(nlogm), -1;
<li>other structural issue (minor), -0.5;
<li>other structural issue (major), -1;
</ul><p>
<i>Other comments from marker</i>:<p>
<!-- Replace this line if you wish to add comments -->
<h4>Program Execution</h4>
Including: compilation, execution on test data, output presentation
and readability.<br>
Programs that do not compile in the test environment will lose all
marks in this section.
Be sure to <tt>verify</tt> your submission and <b>check the output</b>
before you say "finished" to yourself.
<p>
Some subset of the following lines will be retained by the marker.
<p><ul>
<li>Up to Stage 1 initial allocation, +2.
<li>Up to Stage 2 initial allocation, +4.
<li>Up to Stage 3 initial allocation, +6.
<li>Up to Stage 4 initial allocation, +8.
</ul><p>
<i>Deductions</i>
<p>Some subset of the following lines will be retained by the marker.
Marks in each section won't go below zero.
<p><ul>
<li>deduct all execution marks if program generates no output at all; otherwise,
deduct marks for the following items:
</br></br>
<li>incorrect Stage 1 output on invis0, -1 (for all formatting errors in Stage 1, deduct 0.5 marks once across all test cases);
<li>incorrect Stage 2 output on invis0, -1 (for all formatting errors in Stage 2, deduct 0.5 marks once across all test cases);
<li>incorrect Stage 3 output on invis0, -1 (for all formatting errors in Stage 3, deduct 0.5 marks once across all test cases);
<li>incorrect Stage 4 output on invis0, -1 (for all formatting errors in Stage 4, deduct 0.5 marks once across all test cases);
</br></br>
<li>incorrect Stage 1 output on invis1, -1;
<li>incorrect Stage 2 output on invis1, -1;
<li>incorrect Stage 3 output on invis1, -1;
<li>incorrect Stage 4 output on invis1, -1;
</br></br>
<!-- BEGIN-CHOICES
END-CHOICES -->
</ul><p>
<p>
<h4>Late Penalty</h4>
If you make a late submission without having prior agreement from
the lecturer, late submission penalties will apply.
Overall marks won't go below zero.
</ul><p>
<h4>XXMARKXX</h4> <!-- will be replaced automatically -->
<i>Overall comments from marker</i>:<p>
<p>
<i>Assignment Marker: XXMARKERXX</i>
<br>
<i>Subject Coordinator: Jianzhong Qi, jianzhong.qi@unimelb.edu.au</i>
</font>
</body>
</html>

BIN
docs/project02.pdf Executable file

Binary file not shown.

5
src/main.c Normal file
View file

@ -0,0 +1,5 @@
#include <stdio.h>
int main() {
return 0;
}

16
test/test0.txt Executable file
View file

@ -0,0 +1,16 @@
3tu2iywy 10000 800
ceww0p66 150 100
v0xyil5t 3000 500
vb3dtxp0 5000 300
xnwxw8tl 2000 800
%%%%%%%%%%
v5buvljyh0lg vb3dtxp0 2020:04:07:03:50:45 42
1yuy3noa2uxu xnwxw8tl 2020:04:08:04:16:20 729
gl3utnnwxf49 xnwxw8tl 2020:04:08:05:39:00 670
9mopqy3snk3h ceww0p66 2020:04:15:08:06:49 86
6hjqaydtmrq5 vb3dtxp0 2020:04:15:10:09:50 213
mlgtqk8oo74e ceww0p66 2020:04:15:13:45:29 95
u7s604f0u6bz xnwxw8tl 2020:04:22:15:30:43 799
2siil57yqe5k vb3dtxp0 2020:04:23:17:26:20 573
vzdg2z09t7zp v0xyil5t 2020:04:29:18:03:00 3489
n6lcvjyrhvwt 3tu2iywy 2020:04:29:23:07:00 4592

33
test/test0_exp.txt Executable file
View file

@ -0,0 +1,33 @@
=========================Stage 1=========================
Card ID: 3tu2iywy
Daily limit: 10000
Transaction limit: 800
=========================Stage 2=========================
Number of credit cards: 5
Average daily limit: 4030.00
Card with the largest transaction limit: 3tu2iywy
=========================Stage 3=========================
v5buvljyh0lg
1yuy3noa2uxu
gl3utnnwxf49
9mopqy3snk3h
6hjqaydtmrq5
mlgtqk8oo74e
u7s604f0u6bz
2siil57yqe5k
vzdg2z09t7zp
n6lcvjyrhvwt
=========================Stage 4=========================
v5buvljyh0lg IN_BOTH_LIMITS
1yuy3noa2uxu IN_BOTH_LIMITS
gl3utnnwxf49 IN_BOTH_LIMITS
9mopqy3snk3h IN_BOTH_LIMITS
6hjqaydtmrq5 IN_BOTH_LIMITS
mlgtqk8oo74e OVER_DAILY_LIMIT
u7s604f0u6bz IN_BOTH_LIMITS
2siil57yqe5k OVER_TRANS_LIMIT
vzdg2z09t7zp OVER_BOTH_LIMITS
n6lcvjyrhvwt OVER_TRANS_LIMIT

10
test/test1.txt Executable file
View file

@ -0,0 +1,10 @@
ceww0p66 150 100
deww0p11 100 100
eeww0p22 105 101
%%%%%%%%%%
v5buvljyh0lg ceww0p66 2020:04:07:03:50:45 42
1yuy3noa2uxu ceww0p66 2020:04:07:04:16:20 72
gl3utnnwxf49 ceww0p66 2020:04:07:05:39:00 67
9mopqy3snk3h ceww0p66 2020:04:07:08:06:49 86
6hjqaydtmrq5 ceww0p66 2020:04:07:10:09:50 213
mlgtqk8oo74e ceww0p66 2020:04:15:13:45:29 95

25
test/test1_exp.txt Executable file
View file

@ -0,0 +1,25 @@
=========================Stage 1=========================
Card ID: ceww0p66
Daily limit: 150
Transaction limit: 100
=========================Stage 2=========================
Number of credit cards: 3
Average daily limit: 118.33
Card with the largest transaction limit: eeww0p22
=========================Stage 3=========================
v5buvljyh0lg
1yuy3noa2uxu
gl3utnnwxf49
9mopqy3snk3h
6hjqaydtmrq5
mlgtqk8oo74e
=========================Stage 4=========================
v5buvljyh0lg IN_BOTH_LIMITS
1yuy3noa2uxu IN_BOTH_LIMITS
gl3utnnwxf49 OVER_DAILY_LIMIT
9mopqy3snk3h OVER_DAILY_LIMIT
6hjqaydtmrq5 OVER_BOTH_LIMITS
mlgtqk8oo74e IN_BOTH_LIMITS