(****** * This file defines objects and operation related to the GradeSheet * * This is in the middle of being updated to the new RSL decided on during the presentation. *) module Gradesheet; export all; obj Name is components: FirstName and LastName; description:(* The Name object is a containter for the FirstName and LastName objects. Those objects are the essential part of a Name.*); end Name; obj FirstName is string; obj LastName is string; obj Grade is components: string; description: (* The Grade is the student overall grade in the class. It is represented as a string because of different grading schemes available (the final grade could be determined just using letters. *); end Grade; obj Title is string; obj ID is string; obj Data is string; obj CalculatedScore is integer; obj Score is integer; obj Group is string; obj Comments is string; obj Weight is integer; obj MaxScore is integer; obj ScoreString is components:string; description:(* The ScoreString stores the score of a GradedItem if the score can not be reflected in an integer. During grade prediction, if the score cannot be estimated to reach a certain grade, the ScoreString will hold the error associated with that. *); end ScoreString; object GradeSheet is components: silist:StudentInfo* and columnlist:Column*; description: (* The GradeSheet is a collection of rows where each row represents a student and the student's grades. The number of rows in the gradesheet is the same as the number of students. *); end GradeSheet; obj StudentInfo is components: name:Name and id:ID and group:Group and columnitem:ColumnItem* and calcdscore:CalculatedScore and grade:Grade and comments:Comments; description: (* The StudentInfo object is the main part of the GradeSheet. Each student has a name, an ID, a group, zero or more data fields (for email address or phone number), zero or more graded items (assignments, extra credit), and a calculated score and grade. *); end StudentInfo; obj Column is components: Column* and Comments and Weight and MaxScore and Title; description:(* A Column is the architecture for the columns and sub columns. Each column can have zero or more columns of its own. If Column is linked to a DataItem, MaxScore and Weight are -1. The Grader tool needs to know which column is which so we have the Title, Weight, and MaxScores *); end Column; obj ColumnItem is components: (dataitem:DataItem* or gradeditem:GradedItem*) and Title; description: (* A ColumnItem is either an graded item or a data item. A ColumnItem has a Title that is linked to the Title of a Column so the Grader tool knows which column to put the item in. *); end ColumnItem; obj DataItem is components: Data; description: (* A DataItem can best be described as an informational column that does not count towards the students score or grade. It is meant to store phone numbers, email addresses, or other types of textual information. *); end DataItem; obj GradedItem is components: score:Score and scorestring:ScoreString and weight:Weight and maxscore:MaxScore; description: (* A GradedItem is a score for an individual item that affects the student's score and grade. The GradedItem also has a recursive component of itself so that a GradedItem could have sub-GradedItems as children. Example- Project 1 has three different graded parts. There would be 3 GradedItems as a sub items from the Project1 GradedItem. *); end GradedItem; function computeGrade (giList:GradedItem*, g:Grade); end Gradesheet;