An assignment submission server and autograder in C++. Instructors create assignments with a due date, a late due date and a marking scheme. Students submit their program's output, and Markit grades each submission automatically and keeps it with its timestamp and mark.
./demo (demo.cc) sets up one assignment with a marking scheme and submits four
outputs through SubmissionServer. Each is graded as it arrives, and the one after the late due date
is rejected.
SubmissionServerholds every assignment. You can add and remove assignments and submissions, and print all submissions for an assignment or for one student.Assignmentstores its description, due date, late due date, anAutograder, and the submissions it has received.Autograderhas a list of marking items, each worth some marks. It checks a submission's output for each item and adds up the marks, so a grade is "found what we expected, item by item".Submissionrecords the student number, the output, when it was submitted (DateTime) and the resultingMark(x out of y).
All storage uses fixed-size arrays (MAX_ARRAY in defs.h), with no STL containers.
classDiagram
direction LR
SubmissionServer "1" *-- "many" Assignment : holds
Assignment "1" *-- "many" Submission : receives
Assignment *-- Autograder : grades with
Assignment *-- DateTime : due / late due
Submission *-- DateTime : submitted at
Submission *-- Mark : graded as
Autograder ..> Mark : sets
class SubmissionServer{
+addAssignment()
+removeAssignment()
+addSubmission()
+removeSubmission()
+printSubmissionsByStudent()
}
class Assignment{
-int assignNumber
-string description
+addSubmission()
+printLateSubmissions()
}
class Submission{
-int sID
-string output
}
class Autograder{
-string markingItems[]
-int marks[]
+mark(output, Mark)
}
class Mark{
-int mark
-int outof
}
class DateTime{
+lessThan()
+getFormattedDateTime()
}
make
./demo # grade a few sample submissions
./a1 # run the test suites./a1 opens a menu of test suites that exercise every class. Option 6 runs everything:
Testing Print Submission class
Submission by 1001 on (2024/1/1 1:1:1)
(10/10)
AAA
...
Points earned: 4/4
Points earned: 3/3
Points earned: 8/8
...
Your score is 30 out of 30
Assignment.h- Defines the Assignment class for managing multiple SubmissionsSubmission.h- Defines the Submission class representing a student's submission with the time and markDateTime.h- Defines a date/time class for everything else to useMark.h- Defines the Mark class for grades (x out of y)Autograder.h- Defines the Autograder class for grading each student's outputSubmissionServer.h- Defines the SubmissionServer class for managing multiple assignmentsTester.h- Defines the Tester class for testing cases of the other classesdefs.h- Contains global constant for MAX_ARRAY
Assignment.cc- Implements Assignment class methodsSubmission.cc- Implements Submission class methodsDateTime.cc- Implements DateTime class methodsMark.cc- Implements Mark class methodsAutograder.cc- Implements Autograder class methodsSubmissionServer.cc- Implements SubmissionServer class methodsTester.cc- Implements Tester class methodsmain.cc- The main function being run by the executable
Makefile- Build configuration for compiling the project
