edu.pdx.cs399J.grader
Class Assignment

java.lang.Object
  extended by edu.pdx.cs399J.grader.NotableImpl
      extended by edu.pdx.cs399J.grader.Assignment
All Implemented Interfaces:
Notable

public class Assignment
extends NotableImpl

This class represents an assignment give to students in CS399J.

Author:
David Whitlock

Field Summary
static int OPTIONAL
          The assignment is optional (awarded as extra credit)
static int OTHER
          The assignment is some other kind of grade (POA, etc.)
static int PROJECT
          The assignment is a project
static int QUIZ
          The assignment is a quiz
 
Constructor Summary
Assignment(String name, double points)
          Creates a new Assignment with the given name and point value.
 
Method Summary
 String getDescription()
          Returns a description of this Assignment
 String getName()
          Returns the name of this Assignment
 double getPoints()
          Returns the number of points this Assignment is worth
 int getType()
          Returns the type of this Assignment
static void main(String[] args)
          Main program that creates/edits an Assignment in a grade book stored in an XML file.
 void setDescription(String description)
          Sets the description of this Assignment
 void setPoints(double points)
          Sets the number of points that this Assignment is worth.
 void setType(int type)
          Sets the type of this Assignment
 String toString()
          Returns a brief textual description of this Assignment
 
Methods inherited from class edu.pdx.cs399J.grader.NotableImpl
addNote, getNotes, isDirty, makeClean, removeNote, setDirty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

PROJECT

public static final int PROJECT
The assignment is a project

See Also:
Constant Field Values

QUIZ

public static final int QUIZ
The assignment is a quiz

See Also:
Constant Field Values

OTHER

public static final int OTHER
The assignment is some other kind of grade (POA, etc.)

See Also:
Constant Field Values

OPTIONAL

public static final int OPTIONAL
The assignment is optional (awarded as extra credit)

See Also:
Constant Field Values
Constructor Detail

Assignment

public Assignment(String name,
                  double points)
Creates a new Assignment with the given name and point value.

Method Detail

getName

public String getName()
Returns the name of this Assignment


getPoints

public double getPoints()
Returns the number of points this Assignment is worth


setPoints

public void setPoints(double points)
Sets the number of points that this Assignment is worth.


getDescription

public String getDescription()
Returns a description of this Assignment


setDescription

public void setDescription(String description)
Sets the description of this Assignment


getType

public int getType()
Returns the type of this Assignment

See Also:
PROJECT, QUIZ, OTHER

setType

public void setType(int type)
Sets the type of this Assignment

See Also:
PROJECT, QUIZ, OTHER

toString

public String toString()
Returns a brief textual description of this Assignment

Overrides:
toString in class Object

main

public static void main(String[] args)
Main program that creates/edits an Assignment in a grade book stored in an XML file.



Copyright © 2000-2009 Portland State University. All Rights Reserved.