The Electronic Grade Book System
System Design Document
Version: 3.0
Team “B”
Document prepared by:
Date:May 10,2001
Table of Contents
- Introduction
1.1 Purpose...... 3
1.2 Scope...... 3
1.3 References...... 3
1.4 Overview...... 3
1.5 Constraints...... 3
- System Overview
Context Diagram...... 4
- System Architecture
3.1 Architecture Description...... 5
3.2 Component Decomposition...... 5
3.3 Architecture Alternatives...... 9
3.4 Design Rationale...... 9
- Data Design
4.1 Database Description...... 9
4.2 Global Data Structures...... 10
4.3 Object-use Description Diagrams...... 12
- Component Design
5.1 User Interface Design...... 13
5.2 Database Design...... 20
5.3 Import Design...... 44
5.4 Report Design...... 47
- Human Interface Design
6.1 Overview of User Interface...... 61
6.2 Screen Images...... 61
6.3 Screen Objects and Actions...... 62
6.4 Reports Format...... 62
- Requirement Matrix...... 64
- Resource Estimators...... 65
- Definitions, Acronyms, and Abbreviation...... 65
- Appendix A – Figures Table...... 65
1. Introduction
1.1 Purpose
The purpose of this document is to provide a detailed decomposition of the Electronic Grade Book System (EGBS). The coding team shall use this document to implement the EGBS.
1.2 Scope
This software provides a system for the instructor to keep track of students’ grades. The system provides a method to produce statistical data based on the grades both on a per student basis and a whole class basis. The EGBS provides services to an instructor to organize his/her grades, report student performance, and report statistical data that is based on student grades. The EGBS also provides an easy and efficient means of access to these services.
1.3 References
“The Electronic Grade Book System Software Requirement’s Specification”, Version 2.0, March 25, 2001
1.4 Overview
This document provides a detailed description of the system functions and the services it provides. After a summary, there is a decomposition of each subsystem. Following the component description is a detailed design of each component. Finally, there is a design description of the user interface.
1.5 Constraints
This system must be able to run on the UNIX environment available on the GL system, the general system available to all faculty, staff and students, at UMBC known as IRIX. The system must use a text shell interface on the UNIX system. Also, C++ and the CC compiler provided by IRIX will be used to implement the system.
2. System Overview
The EGBS is being developed as the result of our client, Dr. Richard Chang, needing additional functionality from his current grades keeping system. The EGBS incorporates the client’s desired functionalities and allows the client to have access to these functionalities through the user interface. Additionally, the EGBS is divided into components for maintenance and testing purposes. Each component is designed to operate independent of each other. There is no interaction among components except with the executive. From the context diagram below, the client can only access the EGBS through the user interface. The user interface shall pass the client’s selection to the executive. Upon receiving the request, the executive will call the appropriate component to complete the request. Therefore, the executive role is to interact with the other components so it can process requests from the user.
Figure 1.1 – Context Diagram
3. System Architecture
3.1 Architectural Description
This system uses the repository architecture. The repository consists of a database, which is used to store the data. The executive controls the handling of requests and how the database gets modified.
3.2 Component Decomposition
The EGBS consists of four main components. The designs for these four main components and their subcomponents are illustrated in this section. Additionally, this section describes the global data structures used by the EGBS.
3.2.a Object Diagram
Figures 3.1 through 3.4 show the designs for the 4 major components that make up the EGBS.
Figure 3.1Figure 3.2
1
1
1
Figure 3.3Figure 3.4
Figure 3.5 through 3.8 show the designs for backend implementation of the database.
Figure 3.5Figure 3.6
Figure 3.7Figure 3.8
Figures 3.9 and 3.10 show the designs of the two embedded classes used by the report interface to generate user requested report.
Figure 3.9Figure 3.10
Figures 3.11through 3.17 show the global data structures used by the EGBS.
1
Figure 3.11 Figure 3.12 Figure 3.13Figure 3.14
Figure 3.15Figure 3.16 Figure 3.17
3.2.b Aggregation Hierarchy
Figure 3.18 displays the aggregation hierarchy of the EGBS. The aggregation hierarchy shows that only the report interface has subcomponents.
Figure 3.18
3.3 Architectural Alternatives
Before choosing the repository model, we considered the event-driven model. With this model, for every request, other components can associate a procedure with the request. By allowing different components to associate a handle to the request, the executive has no control over how a request would be handled. Therefore, this model was not the appropriate architecture for this system.
3.4 Design Rationale
The repository architecture allows our data be stored in one location. This architecture causes less retrieval times than if the data was spread out in different locations. Also, the repository architecture allows an organized way to handle requests to the system. A trade off to this architecture is that shared data must be in a form that is acceptable by every component that uses the data. Therefore, components that do not require all data in that structure must accept the whole structure rather than accepting only the needed data.
4. Data Design
4.1 Database Description
The database back-end used for the EGBS shall be of a proprietary design. By default, the database shall contain three system table files, namely “systables, syscolumns, and sysfkeys.” The existence of these system tables allows for the proper operation of the database. The ‘systables’ table contains a listing of all of the tables in the database, and where they are located (the table’s filename.) The ‘syscolumns’ table contains a listing of all the columns existing in the database, their data-type, constraints, and in addition to other housekeeping information, which table they belong to. The ‘sysfkeys’ table contains a listing of all of the foreign key relationships existent in the database. The internal storage of all tables including the system tables will be text based. All non-character based column fields are separated by a single space. Character based columns are formatted so that spaces are replaced with a “_” (underscore) character and are then separated by a single space. A set of n column fields makes up a row. A carriage return/linefeed pair then separates each row in a table. The following lines are example rows from a sample database table.
Figure 4.1
A foreign key relationship is defined to be a reference from one table to a second table. The relationship defines columns from the first table that relates to the primary key columns of the second table. The foreign key requires that for all columns involved in the relationship, the data inserted into the first table must already exist in the second table.
The database front-end shall consist of six tables, namely “Students, Classes, Enrollment, Scores, Component Groups, and Components.” This configuration will allow for a single student to be enrolled in multiple courses in the system. The following diagram further describes the relationships of each of the EGBS tables.
Figure 4.2
4.2 Global Data Structures
This system shall contain the following global data structures.
Data Structure Name: Policy
Description: This data structure contains the grading policy. This data structure stores the number of quizzes, homeworks and exams, and attendance along with their respective percentage.
class Policy
{
public:
int NumberOfGroups;
Vector <String> Names;
Vector <Vector<float> Values;
Vector <Vector<float> MaxGrade;
};
Data Structure Name: Grades
Description: This data structure contains the grades for an individual student.
class Grades
{
public:
Vector <Vector<float> Values;
};
Data Structure Name: ClassGrades
Description: This data structures contains the grades for an individual class
class ClassGrades
{
public:
Vector <StudentInfo> Students;
Vector <Grades> Values;
};
Data Structure Name: StudentInfo
Description: This data structure contains the information about an individual student.
class StudentInfo
{
public:
String Name;
String StudentID;
String ClassID;
String Email;
Policy IndividualGradingPolicy;
bool Active;
};
Data Structure Name: ClassInfo
Description: This data structure contains the information about and individual class.
class ClassInfo
{
public :
String ClassID;
String Name;
Policy GradingPolicy;
int NumberOfStudents;
Vector <StudentInfo> StudentData;
};
Data Structure Name: ClassList
Description: This data structure contains information that is needed to make a class list.
class ClassList
{
public:
int NumberOfStudents;
Vector <StudentInfo> Students;
};
Data Structure Name: StudentGradeList
Description: This data structure contains information for a listing of multiple students.
class StudentGradeList
{
public:
Vector <StudentInfo> StudentData;
Vector <Grades> StudentGrades;
};
Data Structure Name: MenuList
Description: This data structure contains the data to be displayed in menu form.
class MenuList
{
public:
String Title;
String Value;
bool IsCenter;
};
4.3 Object-use Description Diagrams
These diagrams show the object interactions among each component of the EGBS. Refer back to section 3.2.a for the decomposition of the EGBS.
Key for the Objection Interaction Diagram
An eclipse/circle represents an object.
A square/rectangle represents a function called.
A hexagon represents a function.
An arrow represents a service request.
Object interactions for the EGBS
Figure 4.3
5. Component Design
This section describes the designs found in section 3.2.a. The description of each component contains its purpose, functionalities, dependencies, and subordinates.
Component Identifier: User Interface
Purpose: The purpose of this component is to allow the client to have access tothe functionalities of the system.
Subordinates: None
Dependencies: None
Class Header File for User Interface:
/*
File Name: User_Interface.h
Description: This file contains all class information for the User
Interface class
Notes: None
*/
#ifndef UI_H
#define UI_H
#include "Common.H"
#include "string.H"
#ifndef WIN32
#include <curses.h>
#endif
/*
Class Name: UserInterface
Description: This class handles all input and output from the user
All user input and screen displays are made through
this class.
Testablity:
1) This Object shall be tested by testing each method of the class.
All methods should be tested for correct output. Correct output
is the only test for testing success.
2) Test Results :
*/
class UserInterface
{
public:
UserInterface(void); // constructor
~UserInterface(void); // destructor
int DisplayMenu(const MenuList MList,int &MenuReturn); // display user menu
int DisplayClassList (ClassList CList,int &ListReturn); // display class listing
int DoGradeEntry(ClassList CList,ClassGrades &NewGrades); // enter grades
int GetStudentInfo (StudentInfo CurrentInfo,StudentInfo &NewInfo); // enter student info
int GetFileName(String &FileName); // get a filename
int GetClassInfoB(ClassInfo CInfo, ClassInfo &NewInfo); // get class info
int GetPolicyInfo(Policy CurrentPolicy,Policy &NewPolicy); // get a policy
int GetKey(String &Key); // get ssn or name
int DisplayGradeList (ClassGrades Scores, Policy StudentPolicy,ClassGrades &NewGrades); // display grade list admin
int DisplayReport (String Report); // display grade report
int CreateClass(Policy &NewPolicy); // create class
int UpdateComponents(Policy CurrentPolicy, Policy &NewPolicy); // update a policy component
protected:
private:
#ifndef WIN32
WINDOW *win;
#endif
char menu(const char *str, char lines, char len,const char *top); // print out menu
void PrintName( String Name );
void PrintData (String Data,int StartAt,int HighlightX,int HighlightY);
int FindGroup(Policy &ThePolicy,int index);
int FindIndex (Policy &ThePolicy,int index);
};
#endif
PDL for User Interface:
/*
File Name: User_Interface.cpp
Description: This file contains the function implementations for the User
Interface class.
Author: Jeff Germain
Created: 3/26/2001
Modified: 4/10/2001
Notes: None
*/
#include “User_Interface.h”
/*
Function Name: DisplayMenu
Description: This function formats the a Menu object to display to the screen
Input: Menu List object with menu choices; menu return value
Output: Integer error code
Testablity:
1)
2)
*/
int DisplayMenu(const MenuList MList,int &MenuReturn)
{
//call menu function passing MList.Title, Mlist.Value
//MenuReturn= Menu function return
return 0
}
/*
Function Name: DisplayClassList
Description: This function formats the class list to display in menu selectable format
Input: Class List object; list return value
Output:Integer error code
Testablity:
1)
2)
*/
int DisplayClassList (ClassList CList,int &ListReturn)
{
//String Studentlist;
//loop for all students
// Add student name to Studentlist
// call menu function ("Class List",Sudentlist);
//ListReturn = Menu function return
return 0
}
/*
Function Name: DoGradeEntry
Description: This function allows the user to enter grades for a list of students
Input: List of students, reference to new grade object
Output:Integer error code
Testablity:
1)
2)
*/
int DoGradeEntry(ClassList CList,ClassGrades &NewGrades)
{
// Prompt for which grade value
// get grade value type ie. HW EXAM Proj
// loop until all grades are entered
// {
// Prompt user for student key value type ie. name or SSN
// loop until student found
// {
// get keypress
// try and match input to student key
// }
// get grade for student
// Validate Item
// enter grade into newgrade object
// }
return 0
}
/*
Function Name: GetStudentInfo
Description: This function allows the user to view/edit student info.
Input: Current student info; new student info.
Output:Integer error code
Testablity:
1)
2)
*/
int GetStudentInfo (StudentInfo CurrentInfo,StudentInfo &NewInfo)
{
// display current student info
// copy current to newinfo.
// loop for all fields in the Student info
// {
// get data item
// Validate Item
// put data item in NewInfo.
// }
}
/*
Function Name: GetFileName
Description: This function prompts the user to enter a filename
Input: file name to return
Output:Integer error code
Testablity:
1)
2)
*/
int GetFileName(String &FileName)
{
// loop until good name
// {
// prompt user
// get file name
// Validate Item
// }
// put filename in FileName
return 0;
}
/*
Function Name: GetClassInfo
Description: This function allows the user to view/edit the class info.
Input: Current info; new class info.
Output:Integer error code
Testablity:
1)
2)
*/
int GetClassInfo(Classinfo CInfo, Classinfo &NewInfo)
{
// display current class info
// copy current to newinfo.
// loop for all fields in the class info
// {
// get data item
// Validate Item
// put data item in NewInfo.
// }
return 0;
}
/*
Function Name: GetPolicyInfo
Description: This function allows the user to view/edit the policy info.
Input: current policy info; new policy info.
Output:Integer error code
Testablity:
1)
2)
*/
int GetPolicyInfo(Policy CurrentPolicy,Policy &NewPolicy)
{
// display current policy info
// copy current to newinfo.
// loop for all fields in the policy info
// {
// get data item
// Validate Item
// put data item in NewInfo.
// }
return 0;
}
/*
Function Name: GetGrade
Description: This function displays a class list and allows user to enter grades
Input: Class list; new grade object
Output:Integer error code
Testablity:
1)
2)
*/
int GetGrade(ClassList Clist,ClassGrades &NewGrades)
{
// Prompt for which grade value type
// get grade value type ie. HW EXAM Proj
// Prompt user for student key value type ie. name or SSN
// loop until student found
// {
// get keypress
// try and match input to student key
// }
// get grade for student
// Validate Item
// enter grade into newgrade object
return 0
}
/*
Function Name: GetKey
Description: This function prompts the user to enter a Key
Input: key return value
Output:Integer error code
Testablity:
1)
2)
*/
int GetKey(String &Key)
{
// prompt of key
// get string
// Validate string
// Assign string to Key
}
/*
Function Name: DisplayGradeList
Description: This function displays the grade list w/ policy
Input: student scores and policy
Output:Integer error code
Testablity:
1)
2)
*/
int DisplayGradeList (ClassGrades Scores, Policy StudentPolicy)
{
// display policy information
// loop for all students
// loop for all groups
// loop for all items
// display grade
return 0;
}
/*
Function Name: DisplayReport
Description: This function prints the report to the screen
Input: report string
Output:Integer error code
Testablity:
1)
2)
*/
int DisplayReport (String Report)
{
// loop until end of report
// print report line
return 0;
}
/*
Function Name: CreateClass
Description: This Function creates a new class listing
Input: new policy info
Output:Integer error code
Testablity:
1)
2)
*/
int CreateClass(Policy &NewPolicy)
{
// call updatecomponents
// return newpolicy
}
/*
Function Name: UpdateComponents
Description: This function allows the user to update the policy info
Input: Current Policy; new policy return
Output:Integer error code
Testablity:
1)
2)
*/
int UpdateComponents(Policy CurrentPolicy, Policy &NewPolicy)
{
// display current policy info
// copy current to newinfo.
// loop for all fields in the policy info
// {
// get/edit data item
// Validate Item
// put data item in NewInfo.
// }
return 0;
}
/*
Function Name: menu
Description: This function prints the menu to the screen
Input: Menu choices, number of lines, length of lines, title
Output: menu selection
Testablity:
1)
2)
*/
char menu(char *str, char lines, char len, char *top)
{
// display menu box
// display title
// display menu items
// loop
// {
// redraw menu
// get input
// Validate Input
// if (upkey)
// move current selection up;
// if (downkey)
// move current selection down;
// if (enterkey)
// exit loop;
// }
// return input;
}
Component Identifier: DB Interface
Purpose: The purpose of this component is to store the data in an organized manner.
Subordinates: DB Col Descriptor, SQL DB, DB Table, and DB System Table