Need help with assignment (create UML diagram and todo list)

profilekevincoles
assignment.zip

assignment/.DS_Store

__MACOSX/assignment/._.DS_Store

assignment/assignment.docx

The application will keep track of one student’s assignment grade information for any number courses, and each course can be anywhere from 1 to 16 weeks long. For each week of the course, the assignments are (1) threaded discussion score, (2) quiz score, (3) lab assignment score, and an exam. Not all the week’s will have each of the assignment score recorded, and the final week of the course will have a final exam score only.

A student will be able to keep assignment scores for any number of courses, and each course will have the school name, the course number, the course title, and how many weeks there are in the course.

For a selected course, the application will allow the user to enter the scores, and once the scores are entered for the week the application will calculate the weekly total and the weekly average, along with the course running total score, running average, and letter grade to date (based on course syllabus grade breakdown).

The database will contain two tables (1) Courses and (2) Assignments, using the following table names and fields

1. Course

a. Id

b. School

c. Number

d. Title

2. Assignments

a. Id

b. CourseID

c. WeekNumber

d. TDA

e. Lab

f. Quiz

g. Test

The application will display a table that displays the following for each course that is recorded:

1. Course Number

2. Course Title

3. Course Grade

While the application and database will be user name and password protected, it is outside the scope of this project to provide a complete, robust, and secure authentication component. So, for the purposes of this development, you will just store the user name and password comma separated value text file.

Design Requirements

The program design shall adhere to the following design requirements:

1. The program will be constructed using a 3-tier architecture (1) data, (2) business, and (3) presentation tier and each tier will only implement the operations appropriate for the tier.

2. The graphical user interface will be constructed using a tab panel interface, with each tab containing only those operations related to the tab heading.

3. The order of the tabs will be in logical sequence.

4. The graphical user interface will contain a main menu bar, and there shall be a menu for each tab that mirrors the operations on the tab.

5. Each menu item will have a logical name and short cut key assigned.

6. Each “active” control (i.e. radio button, command button...) shall have a tooltip describing the operation the control provides.

7. There shall be a logical, sequential tab order for the input controls on the form.

8. All class members, both variables and methods, shall by default be made private.

9. Access to any class/object data member shall only be done through getters and setters.

10. Methods shall only be made public if it is necessary for other objects to call the methods.

11. Private variables shall only be access through getters and setters.

12. All setters will have validation logic to ensure the private variable is always in a stable state.

FUNCTIONAL REQUIREMENTS

The program operations will adhere to the following requirements:

1. The maximum points of all the assignments is 1000 points.

2. Each input score item shall be validated against a lower and upper bound.

3. The lower and upper bounds of each of the assignments shall be stored in the database or a file.

4. The user must authenticate into the program when it starts.

5. The user name and password shall be stored in a file (which simulates an authentication component).

6. The running total, running average, and current grade shall only include scores that have been recorded.

7. The threaded discussion score shall be calculated by the user being able to select whether a student attended, or posted a note on a day of the week, for each of the 7 weeks.

8. If a student attends at least three days, the student will receive full credit for the weekly threaded discussion score.

9. The automatically assigned threaded discussion score, can be overridden to a lower, or higher score, but within the limits of the minimum and maximum scores.

10. The weekly total, weekly average, running total, and running average shall be updated any time one of the dependent fields is updated.

11. Database operations shall be secure and be written to minimize SQL injection or other transport type attacks.

Analysis and Design

You will create an analysis and design document that consists of:

1. Document the current “as is” structure of the program.

2. Create a class/Object Diagram (this can be done in any drawing tool, or even hand drawn and take a picture).

Instead of you creating a program from scratch, I am giving a program shell with several TODO action items.  You will also be asked to document the structure and class/object diagram given the project."

Because of this, I assume that these diagrams (UML) as well as a completed TODO list (commented throughout the shell) will need to be completed.

__MACOSX/assignment/._assignment.docx

assignment/source code/.DS_Store

__MACOSX/assignment/source code/._.DS_Store

assignment/source code/src/.DS_Store

__MACOSX/assignment/source code/src/._.DS_Store

assignment/source code/src/business/.DS_Store

__MACOSX/assignment/source code/src/business/._.DS_Store

assignment/source code/src/business/Assignment.java

assignment/source code/src/business/Assignment.java

package  business ;
import  helpers . * ;
public   class   Assignment   {
    
     private   static   final   String  DEFAULT_TITLE  =   "Assignment" ;
     private   static   final   int  MIN_POINTS  =   0 ;
     private   static   final   int  MAX_POINTS  =   1000 ;
    
     private   String  title ;
     private   int  maxScore ;
     private   int  score ;
    
     public   Assignment ()   {
        setTitle ( DEFAULT_TITLE );
        setMaxScore ( maxScore );
        setScore ( MIN_POINTS );
     }
     public   Assignment ( String  title ,   int  maxScore )   {
        setTitle ( title );
        setMaxScore ( maxScore );
        setScore ( maxScore );
     }
    
     public   void  setTitle ( String  title )   {
        this . title  =   StringHelpers . setStringValue ( title ,  DEFAULT_TITLE );
     }
     public   String  getTitle ()   {
         return  title ;
     }
     public   void  setMaxScore ( int  maxScore )   {
         this . maxScore  =   NumberHelpers . findRangeValue ( maxScore ,  MIN_POINTS ,  MAX_POINTS );
     }
     public   int  getMaxScore ()   {
         return  maxScore ;
     }
     public   void  setScore ( int  score )   {
         this . score  =   NumberHelpers . findRangeValue ( score ,  MIN_POINTS ,  maxScore );
     }
     public   int  getScore ()   {
         return  score ;
     }
     public   double  getPercent ()   {
         double  percent  =   0 ;
         if   ( maxScore  >   0   )   {
            percent  =  score / maxScore ;
         }
         return  percent ;
     }
     public   void  clearScore ()   {
        score  =  MIN_POINTS ;
     }

    @ Override
     public   String  toString ()   {
        
         // TODO:  create an output create that displays the title, awarded score
         //the maximum score, and the percentage ensuring all numbers
         //are properly formatted to no more than one decimal
         StringBuilder  str  =   new   StringBuilder ();
       
        
         return  str . toString ();
     }
    
}

__MACOSX/assignment/source code/src/business/._Assignment.java

assignment/source code/src/business/AssignmentList.java

assignment/source code/src/business/AssignmentList.java


package  business ;
import  java . util . ArrayList ;
import  data . AssignmentDB ;

public   class   AssignmentList   {
      private   ArrayList < WeekAssignment >  assignmentList ;
      private   final   AssignmentDB  assignmentDB ;
      private   int  courseKey  =   - 1 ;
     
     public   AssignmentList ( int  courseKey ,   Authentication  authentication )   {
        setCourseKey ( courseKey );
        assignmentDB  =   new   AssignmentDB ( authentication );
        retrieveAssignmentList ();
     }
    
     public   ArrayList < WeekAssignment >  getAssignmentList ()   {
         return  assignmentList ;
     }
     public   void  setCourseKey ( int  courseKey )   {
         this . courseKey  =  courseKey ;
     }
     private   void  retrieveAssignmentList ()   {
        assignmentList  =  assignmentDB . getList ( courseKey );
     }
    
     public   void  setAttendance ( int  weekNumber ,   int  dayNumber ,   boolean  wasThere )   {
        assignmentList . get ( weekNumber - 1 ). setAttendance ( dayNumber ,  wasThere );
     }
     public   int  getCalculatedAttendance ( int  weekNumber )   {
         return  assignmentList . get ( weekNumber - 1 ). getCalculatedAttendanceScore ();
     }
     public   void  setTDAScore ( int  weekNumber ,   int  score )   {
        assignmentList . get ( weekNumber - 1 ). setTDAScore ( score );
     }
     public   void  setLabScore ( int  weekNumber ,   int  score )   {
        assignmentList . get ( weekNumber - 1 ). setLabScore ( score );
     }
     public   void  setQuizScore ( int  weekNumber ,   int  score )   {
        assignmentList . get ( weekNumber - 1 ). setQuizScore ( score );
     }
     public   void  setTestScore ( int  weekNumber ,   int  score )   {
        assignmentList . get ( weekNumber - 1 ). setTestScore ( score );
     }
     public   String  getWeekAssignmentInformation ( int  weekNumber )   {
           return  assignmentList . get ( weekNumber - 1 ). toString ();
     }
     public   void  clearScores ( int  weekNumber )   {
         // TODO:  for the given week assignment, clear the score in the assignment object.
     }
     
}
    
    

__MACOSX/assignment/source code/src/business/._AssignmentList.java

assignment/source code/src/business/Authentication.java

assignment/source code/src/business/Authentication.java

package  business ;
import  helpers . * ;
import  data . AuthenticationIO ;
import  java . io . Serializable ;

public   class   Authentication   implements   Serializable   {
    
     private   String  userName  =   "" ;
     private   String  password  =   "" ;
     private   AuthenticationIO  authIO ;
    
     public   Authentication ()   {   }
    
     public   Authentication ( String  userName ,   String  password )   {
        setUserName ( userName );
        setPassword ( password );
     }
    
     public   void  setUserName ( String  userName )   {
         this . userName  =   StringHelpers . setStringValue ( userName ,   "" );
     }
     public   String  getUserName ()   {
         return  userName ;
     }
     public   void  setPassword ( String  passWord )   {
         this . password  =   StringHelpers . setStringValue ( passWord ,   "" );
     }
     public   String  getPassword ()   {
         return  password ;
     }
    
     public   boolean  authenticate ()   {
         boolean  success  =   false ;
        
        authIO  =   new   AuthenticationIO ();
         Authentication  stored  =  authIO . getAuthentication ();
        
         if   ( stored  ==   null )   {
            success  =  authIO . createAuthenticationFile ( this );
             OutputHelpers . showStandardDialog ( "New User: "   +  userName  +   " created" ,   "Create new user" );
         }
         else   {
             if   ( userName . compareToIgnoreCase ( stored . getUserName ())   ==   0 )   {
                success  =   true ;
             }
             else   {
                 OutputHelpers . showStandardDialog ( "Invalid user name--please update user name and try again" ,   "Invalid User Name" );
             }
             if   ( success )   {
                // TODO:  write the algorithm to compare the provided password with the
                //stored password, keeping in mind that character case matters.
             }
         }
        
         return  success ;
     }
    
}

__MACOSX/assignment/source code/src/business/._Authentication.java

assignment/source code/src/business/ClassAssignments.java

assignment/source code/src/business/ClassAssignments.java

 
package  business ;
import  helpers . * ;
import  java . util . ArrayList ;

public   class   ClassAssignments   {
    
     private   static   final   double  MAX_PERCENT  =   1 ;
     private   static   final   double  LOW_A  =   .90 ;
     private   static   final   double  LOW_B  =   .80 ;
     private   static   final   double  LOW_C  =   .70 ;
     private   static   final   double  LOW_D  =   .60 ;
    
     private   static   final   int  FINAL_EXAM_POINTS  =   210 ;
     public   static   final   int  MIN_SCORE  =   0 ;
    
     private   final   Course  course ;
     private   AssignmentList  assignmentList ;
    
     private   int  totalScore  =   0 ;
     private   int  totalPoints  =   0 ;

     private   int  key  =   - 1 ;
     private   int  courseKey  =   - 1 ;
     private   final   Authentication  authentication ;
    
     public   ClassAssignments ( Course  course ,   Authentication  authentication )   {
         this . course  =  course ;
         this . authentication  =  authentication ;
        initializeAssignmentList ();
     }
     public   void  setKey ( int  key )   {
         this . key  =  key ;
     }
     public   int  getKey ()   {
         return  key ;
     }
     public   int  getCourseKey ()   {
         return  courseKey ;
     }

     public   void  setCourseKey ( int  courseKey )   {
         this . courseKey  =  courseKey ;
     }
     private   void  initializeAssignmentList ()   {
       assignmentList  =   new   AssignmentList ( course . getKey (),  authentication );
     }
    
     public   int  getNumberWeeks ()   {
         return  course . getNumberWeeks ();
     }
    
     /***************** bounds *******************************/
    
     public   int  getMinScore ()   {
         return  MIN_SCORE ;
     }
     public   int  getMAXTDAScore ()   {
         return   WeekAssignment . TDA_POINTS ;
     }
     public   int  getMAXLabScore ()   {
         return   WeekAssignment . LAB_POINTS ;
     }
     public   int  getMaxQuizScore ()   {
         return   WeekAssignment . QUIZ_POINTS ;
     }
     public   int  getMaxTestScore ()   {
         //TODO:  write the code to return the maximum vaue of a test score
         return   0 ;
     }
    
     /************* school information ***********************/
     public   void  setSchool ( String  school )   {
        course . setSchool ( school );
     }
     public   void  setCourseTitle ( String  title )   {
        course . setTitle ( title );
     }
     public   void  setCourseNumber ( String  courseNumber )   {
        course . setNumber ( courseNumber );
     }
    
     /******************** weekly assignment information ************************/
    
     public   void  setAttendance ( int  weekNumber ,   int  dayNumber ,   boolean  wasThere )   {
        assignmentList . setAttendance ( weekNumber ,  dayNumber ,  wasThere );
     }
     public   int  getCalculatedAttendance ( int  weekNumber )   {
         return  assignmentList . getCalculatedAttendance ( weekNumber );
     }
     public   void  setTDAScore ( int  weekNumber ,   int  score )   {
        assignmentList . setTDAScore ( weekNumber ,  score );
     }
     public   void  setLabScore ( int  weekNumber ,   int  score )   {
        assignmentList . setLabScore ( weekNumber ,  score );
     }
     public   void  setQuizScore ( int  weekNumber ,   int  score )   {
         //TODO:  write the code to set the quiz score for the given week
     }
     public   void  setTestScore ( int  weekNumber ,   int  score )   {
        assignmentList . setTestScore ( weekNumber ,  score );
     }
     /*************** running totals ***********************************/
    
     private   void  getRunningTotals ()   {
        totalScore  =   0 ;
        totalPoints  =   0 ;
         for ( WeekAssignment  week : assignmentList . getAssignmentList ())   {
             if   ( week . IncludeInTotal ())   {
                totalScore  +=  week . getTotalScore ();
                totalPoints  +=  week . getMaxPoints ();
             }
         }
     }
     public   int  getTotalScore ()   {
        getRunningTotals ();
         return  totalScore ;
     }
     public   double  getPercent ()   {
         double  percent  =   0 ;
        getRunningTotals ();
         if   ( totalPoints  >   0 )   {
            percent  =   ( double )  totalScore  /   ( double )  totalPoints ;
         }
         return  percent ;
     }
     public   String  getGrade ()   {
         String  grade  =   "U" ;
         double  percent  =  getPercent ();
         // TODO: write the algorithm to determine the grade
         return  grade ;
     }
     public   String  getWeekAssignmentInformation ( int  weekNumber )   {
           return  assignmentList . getWeekAssignmentInformation ( weekNumber );
     }
     public   void  clearScores ( int  weekNumber )   {
        assignmentList . clearScores ( weekNumber );
     }
    @ Override  
     public   String  toString ()   {
         StringBuilder  str  =   new   StringBuilder ();
        
        str . append ( course . toString ());
        str . append ( "\n" );

         for ( WeekAssignment  week : assignmentList . getAssignmentList ())   {
            str . append ( "\n" );
            str . append ( week . toString ());
         }
        str . append ( "\n" );
  
 
         return  str . toString ();
     }
    
}

__MACOSX/assignment/source code/src/business/._ClassAssignments.java

assignment/source code/src/business/Course.java

assignment/source code/src/business/Course.java


package  business ;
import  helpers . * ;
public   class   Course   {
    
     private   static   final   String  DEFAULT_SCHOOL  =   "Devry University" ;
     private   static   final   String  DEFAULT_NUMBER  =   "CIS355A" ;
     private   static   final   String  DEFAULT_TITLE  =   "Business Application Programming" ;  
     private   static   final   int  DEFAULT_NUMBER_WEEKS  =   8 ;
     private   static   final   int  MIN_NUMBER_WEEKS  =   1 ;
     private   static   final   int  MAX_WEEKS  =   16 ;
    
     private   String  school ;
     private   String  number ;
     private   String  title ;
     private   int  numberWeeks ;
    
     private   int  key  =   - 1 ;

  
     public   Course ()   {
         this . school  =  DEFAULT_SCHOOL ;
         this . number  =  DEFAULT_NUMBER ;
         this . title  =  DEFAULT_TITLE ;
         this . numberWeeks  =  DEFAULT_NUMBER_WEEKS ;
     }
     public   Course ( int  key )   {
         this ();
        setKey ( key );
     }
     public   Course ( int  key ,   String  school ,   String  number ,   String  title ,   int  numberWeeks )   {
        setKey ( key );
        setSchool ( school );
        setNumber ( number );
        setTitle ( title );
        setNumberWeeks ( numberWeeks );  
     }
     public   int  getKey ()   {
         return  key ;
     }
     public   void  setKey ( int  key )   {
         this . key  =  key ;
     }
     public   void  setSchool ( String  school )   {
         this . school  =   StringHelpers . setStringValue ( school ,  DEFAULT_SCHOOL );
     }
     public   String  getSchool ()   {
         return  school ;
     }
     public   String  getNumber ()   {
         return  number ;
     }
     public   String  getTitle ()   {
         return  title ;
     }
     public   void  setNumber ( String  number )   {
         this . number  =   StringHelpers . setStringValue ( number ,  DEFAULT_NUMBER );
     }
     public   void  setTitle ( String  title )   {
         this . title  =   StringHelpers . setStringValue ( title ,  DEFAULT_TITLE );
     }
     public   void  setNumberWeeks ( int  numWeeks )   {
         //TODO:  write the code to set the number of weeks betwee 1 and maximum number of weeks allowed
     }
     public   int  getNumberWeeks ()   {
         return  numberWeeks ;
     }
    @ Override
     public   String  toString ()   {
         return  getNumber ()   +   ": "   +  getTitle ();
     }
    
}

__MACOSX/assignment/source code/src/business/._Course.java

assignment/source code/src/business/CourseList.java

assignment/source code/src/business/CourseList.java


package  business ;

import  java . util . ArrayList ;
import  javax . swing . DefaultListModel ;
import  data . CourseDB ;
import  helpers . * ;
import  java . util . Vector ;

public   class   CourseList   {
    
     private   ArrayList < Course >  courseList ;
     private   final   CourseDB  courseDB ;
     private   ArrayList < CourseSummary >  summaryList ;
     private   Authentication  authentication ;
    
     public   CourseList ( Authentication  authentication )   {
        courseList  =   new   ArrayList <> ();
        courseDB  =   new   CourseDB ( authentication );
        retrieveCourseList ();
     }
     private   void  retrieveCourseList ()   {
        courseList . clear ();
        courseList  =  courseDB . getList ();
        retreivedSummaryList ();
        
     }
     public   int  displayCourseList ( DefaultListModel < Course >  listModel )   {
         int  numRecords  =   0 ;
         if   ( courseList  ==   null )   {
            retrieveCourseList ();
         }
         if   ( courseList . size ()   >   0 )   {
            numRecords  =  courseList . size ();
             for ( Course  course : courseList )   {
                listModel . addElement ( course );
             }
         }
         return  numRecords ;
     }
     private   void  retreivedSummaryList ()   {
        summaryList  =   new   ArrayList <> ();
         CourseSummary  aSummary ;
         ClassAssignments  assignment ;
         for ( Course  course : courseList )   {
            aSummary  =   new   CourseSummary ();
            aSummary . setNumber ( course . getNumber ());
            aSummary . setTitle ( course . getTitle ());
            
            assignment  =   new   ClassAssignments ( course ,  authentication );
            aSummary . setGrade ( assignment . getGrade ());
            summaryList . add ( aSummary );
         }
     }
     public   ArrayList < CourseSummary >  summaryList ()   {
         return  summaryList ;
     }
     public   Vector < String >  getColumnNames ()   {
          Vector < String >  columnNames  =   new   Vector <> ();
          // TODO:  write the code to set the columns names to logical, user friendly names
         
          return  columnNames ;
     }
    
}

__MACOSX/assignment/source code/src/business/._CourseList.java

assignment/source code/src/business/CourseSummary.java

assignment/source code/src/business/CourseSummary.java

package  business ;

import  helpers . StringHelpers ;

public   class   CourseSummary   {
    
     private   String  number  =   "" ;
     private   String  title  =   "" ;
     private   String  grade  =   "" ;
    
    
     // TODO:  add code to validate all the input values to ensure they are not empty
    
     public   CourseSummary ()   {
     }
     public   CourseSummary ( String  number ,   String  title ,   String  grade )   {
        setNumber ( number );
        setTitle ( title );
        setGrade ( grade );
     }
     public   String  getNumber ()   {
         return  number ;
     }
     // TODO: for all the setters, write the code to ensure the strings are not empty
     public   void  setNumber ( String  courseNumber )   {
         this . number  =   StringHelpers . setStringValue ( courseNumber ,   "CN" );
     }
     public   String  getTitle ()   {
         return  title ;
     }
     public   void  setTitle ( String  courseTitle )   {
         // TODO: for all the setters, write the code to ensure the strings are not empty
     }
     public   String  getGrade ()   {
         return  grade ;
     }
     public   void  setGrade ( String  grade )   {
         // TODO: for all the setters, write the code to ensure the strings are not empty
     }
}

__MACOSX/assignment/source code/src/business/._CourseSummary.java

assignment/source code/src/business/Student.java

assignment/source code/src/business/Student.java

package  business ;

import  helpers . * ;

public   class   Student   {
    
     private   static   final   String  DEFAULT_NAME  =   "Not Given" ;
    
     String  firstName ;
     String  lastName ;
     String  email ;
    
     public   Student ()
     {
         this . firstName  =  DEFAULT_NAME ;
         this . lastName  =  DEFAULT_NAME ;
         this . email  =  DEFAULT_NAME ;
     }
     public   Student ( String  firstName ,   String  lastName )   {
        setFirstName ( firstName );
        setLastName ( lastName );
     }
      public   String  getFirstName ()   {
         return  firstName ;
     }

     public   final   void  setFirstName ( String  firstName )   {
         this . firstName  =   StringHelpers . setStringValue ( firstName ,  DEFAULT_NAME );
     }
     public   String  getLastName ()   {
         return  lastName ;
     }
     public   final   void  setLastName ( String  lastName )   {
         this . lastName  =   StringHelpers . setStringValue ( lastName ,  DEFAULT_NAME );
     }
     public   void  setEmail ( String  email )   {
         if   ( StringHelpers . validateEmail ( email ))   {
             this . email  =  email ;
         }
         else   {
             this . email  =  DEFAULT_NAME ;
         }
     }
     public   String  getEmail ()   {
        
         String  str  =   "" ;
         if   ( isValidEmail ())   {
            str  =   this . email ;
         }
         return  str ;
     }
     public   boolean  isValidEmail ()   {
         return   StringHelpers . validateEmail ( this . email );
     }
     public   String  getFullName ()   {
         return  firstName  +   " "   +  lastName ;
     }

    @ Override
     public   String  toString ()   {
         StringBuilder  str  =   new   StringBuilder ();
        str . append ( getFullName ());
        
         return  str . toString ();
     }
}

__MACOSX/assignment/source code/src/business/._Student.java

assignment/source code/src/business/WeekAssignment.java

assignment/source code/src/business/WeekAssignment.java


package  business ;

import  helpers . * ;
public   class   WeekAssignment   {
    
     public   static   final   int  TDA_POINTS  =   20 ;
     public   static   final   int  LAB_POINTS  =   55 ;
     public   static   final   int  QUIZ_POINTS  =   30 ;
     public   static   final   int  TEST_POINTS  =   210 ;
     public   static   final   int  MIN_DAYS_PARTICIPATION  =   3 ;
    
     private   static   final   int  MIN_WEEK  =   1 ;
     private   static   final   int  MAX_WEEK  =   8 ;
    
     private   int  key  =   - 1 ;
     private   int  classKey  =   - 1 ;
     private   int  weekNumber ;
    
     private   final   WeekAttendance  attendance  =   new   WeekAttendance ( TDA_POINTS ,  MIN_DAYS_PARTICIPATION );
     private   final   Assignment  tda  =   new   Assignment ( "Threaded Discussion" ,  TDA_POINTS );
     private   final   Assignment  lab  =   new   Assignment ( "Programming Lab" ,  LAB_POINTS );
     private   final   Assignment  quiz  =   new   Assignment ( "Quiz" ,  QUIZ_POINTS );
     private   final   Assignment  test  =   new   Assignment ( "Test" ,  TEST_POINTS );
    
     private   boolean  includeInTotal  =   false ;
    
     public   WeekAssignment ()   {
        weekNumber  =  MIN_WEEK ;
     }
     public   WeekAssignment ( int  classKey ,   int  weekNumber )   {
        setWeekNumber ( weekNumber );
        setClassKey ( classKey );
     }
      public   int  getClassKey ()   {
         return  classKey ;
     }

     public   void  setClassKey ( int  classKey )   {
         this . classKey  =  classKey ;
     }

     public   int  getKey ()   {
         return  key ;
     }

     public   void  setKey ( int  key )   {
         this . key  =  key ;
     }
    
     public   void  setWeekNumber ( int  weekNumber )   {
         this . weekNumber  =   NumberHelpers . findRangeValue ( weekNumber ,  MIN_WEEK ,  MAX_WEEK );
     }
     public   void  clearScores ()   {
         // TODO:  write the code to clear all the assignment scores as well as the attendance attributes
      
     }
     public   void  setAttendance ( int  day ,   boolean  wasThere )   {
        attendance . setAttendance ( day ,  wasThere );
        setTDAScore ( attendance . getScore ());
        includeInTotal  =   true ;
     }
     public   int  getCalculatedAttendanceScore ()   {
         return  attendance . getScore ();
     }
     public   void  setTDAScore ( int  score )   {
        tda . setScore ( score );
        includeInTotal  =   true ;
     }
     public   void  setLabScore ( int  score )   {
        lab . setScore ( score );
        includeInTotal  =   true ;
     }
     public   void  setQuizScore ( int  score )   {
        // TODO: write the code to set the quiz score and ensure it is included in the total
     }
     public   void  setTestScore ( int  score )   {
        test . setScore ( score );
        includeInTotal  =   true ;
     }
     public   int  getTotalScore ()   {
         int  total  =   0 ;
        total  =  tda . getScore ();
        // TODO: complete the summing of all the assignment scores for the week
        
         return  total ;
     }
     public   boolean   IncludeInTotal ()   {
         return  includeInTotal ;
     }
     public   int  getMaxPoints ()   {
         return  TDA_POINTS  +  LAB_POINTS  +  QUIZ_POINTS  +  TEST_POINTS  ;
     }
     public   double  getPercent ()   {
         double  percent  =   0 ;
         if   ( getMaxPoints ()   >   0 )   {
            percent  =   ( double ) getTotalScore () / ( double ) getMaxPoints ();
         }
         return  percent ;
     }
     public   String  weekAssignmentDetails ()   {
         StringBuilder  str  =   new   StringBuilder ();
        str . append ( "Assignment Week: " );
        str . append ( weekNumber );
        str . append ( "Total: " );
        str . append ( getTotalScore ());
        str . append ( "/" );
        str . append ( getMaxPoints ());
        str . append (   " = " );
        str . append ( OutputHelpers . formattedPercent ( getPercent (),   0 ));
        str . append ( "\n" );
        str . append ( tda . toString ());
        str . append ( "\n" );
        str . append ( quiz . toString ());
        str . append ( "\n" );
        str . append ( lab . toString ());
        str . append ( "\n" );
        str . append ( test . toString ());
        
         return  str . toString ();
     }
    @ Override
     public   String  toString ()   {
         StringBuilder  str  =   new   StringBuilder ();
        str . append ( "Week: " );
        str . append ( weekNumber );
        str . append ( " Total: " );
        str . append ( getTotalScore ());
        str . append ( "/" );
        str . append ( getMaxPoints ());
        str . append (   " = " );
        str . append ( OutputHelpers . formattedPercent ( getPercent (),   0 ));
        
         return  str . toString ();
     }
    
}

__MACOSX/assignment/source code/src/business/._WeekAssignment.java

assignment/source code/src/business/WeekAttendance.java

assignment/source code/src/business/WeekAttendance.java


package  business ;
import  helpers . NumberHelpers ;

public   class   WeekAttendance   {
    
     private   static   final   int  MIN_DAYS  =   3 ;
     private   static   final   int  FIRST_DAY  =   1 ;
     private   static   final   int  LAST_DAY  =   7 ;
     private   static   final   int  FIRST_WEEK  =   1 ;
     private   static   final   int  LAST_WEEK  =   7 ;
     private   static   final   int  MIN_POINTS  =   0 ;
     private   static   final   int  MAX_POINTS  =   100 ;
     private   static   final   int  MIN_NUM_DAYS  =   0 ;
     private   static   final   int  MAX_NUM_DAYS  =   3 ;
    
     private   int  score  =   0 ;
     private   boolean []  attended  =   new   boolean [ 7 ];
     private   int  maxScore  =   0 ;
     private   int  minDays  =  MIN_DAYS ;
     private   int  pointsPerDay ;
    
     public   WeekAttendance ()   {
        initializeAttendance ();
     }
     public   WeekAttendance ( int  maxScore ,   int  minDays )   {
         this ();
        setMaxScore ( maxScore );
        setMinDays ( minDays );
     }
     public   void  clearAttendance ()   {
        initializeAttendance ();
     }
     public   void  setMinDays ( int  minDays )   {
        this . minDays  =   NumberHelpers . findRangeValue ( minDays ,  MIN_NUM_DAYS ,  MAX_NUM_DAYS );
     }
     public   void  setMaxScore ( int  maxScore ){
         this . maxScore  =   NumberHelpers . findRangeValue ( maxScore ,  MIN_POINTS ,  MAX_POINTS  );
     }
     public   int  getMaxScore ()   {
         return  maxScore ;
     }
     private   void  initializeAttendance ()   {
         for   ( int  i  =   0 ;  i  <  attended . length ;  i ++ )   {
            attended [ i ]   =   false ;
         }
     }
     public   void  setAttendance ( int  day ,   boolean  wasThere )   {
         if   ( day  >=  FIRST_DAY  &&  day  <=  LAST_DAY )   {
            attended [ day  -   1 ]   =  wasThere ;
         }
     }
     public   int  getNumberDaysAttended ()   {
         int  count  =   0 ;
        
         //TODO:  write the code to count how many days of attendance for the week
        
         return  count ;
     }
     public   int  getScore ()   {
         int  count  =   0 ;
         if   ( minDays  >   0 )   {
            pointsPerDay  =  maxScore / minDays ;
         }
         for ( int  i  =   0 ;  i  <  attended . length ;  i ++ )   {
             if   ( attended [ i ])   {
                count ++ ;
             }
         }
         if   ( count  >=  minDays )   {
            score  =  maxScore ;
         }
         else   {
            score  =  count  *  pointsPerDay ;
         }
         return  score ;
     }
    @ Override
     public   String  toString ()   {
         StringBuilder  str  =   new   StringBuilder ();
        
        str . append ( "\n#Days attendended: " );
        str . append ( getNumberDaysAttended ());
        str . append ( "\nScore: " );
        str . append ( getScore ());
        
         return  str . toString ();
     }
}

__MACOSX/assignment/source code/src/business/._WeekAttendance.java

__MACOSX/assignment/source code/src/._business

assignment/source code/src/data/.DS_Store

__MACOSX/assignment/source code/src/data/._.DS_Store

assignment/source code/src/data/AssignmentDB.java

assignment/source code/src/data/AssignmentDB.java

package  data ;
import  business . Authentication ;
import  helpers . * ;
import  business . WeekAssignment ;
import  java . util . ArrayList ;

public   class   AssignmentDB   extends   DataBaseParent   {
    
   
     public   AssignmentDB ()   {
         super ();
     }
     public   AssignmentDB ( Authentication  authentication )   {
        super ( "Assignment" ,  authentication );
     }
    
     //TODO:  write the code to save the weekly assignment
      public   boolean  save ( WeekAssignment  aAssignment )   {
         boolean  success  =   true ;
        
         OutputHelpers . showStandardDialog ( aAssignment . toString ()   +   " saved" ,   "Save Week Assignment" );
        
         return  success ;
     }
      //TODO:  write the code to delete the weekly assignment
     public   boolean  delete ( WeekAssignment  aAssignment )   {
         boolean  success  =   true ;
        
         OutputHelpers . showStandardDialog ( aAssignment . toString ()   +   " deleted" ,   "Delete Week Assignment" );
        
         return  success ;
     }
     //TODO:  write the code to update the weekly assignment
     public   boolean  update ( WeekAssignment  aAssignment )   {
         boolean  success  =   true ;
        
         OutputHelpers . showStandardDialog ( aAssignment . toString ()   +   " updated" ,   "Update Week Assignment" );
        
         return  success ;
     }
     // TODO: write the code to pull all the weekly assignments for a course from the database
     public   ArrayList < WeekAssignment >  getList ( int  courseKey )   {
         ArrayList < WeekAssignment >  assignmentList  =   new   ArrayList <> ();
        
         for ( int  i  =   1 ;  i  <=   8 ;  i ++ )   {
            assignmentList . add ( new   WeekAssignment ( courseKey ,  i ));
         }
        
         return  assignmentList ;
     }
     //TODO: write the code to delete all assignments from the database
     //ensuring that the user is prompted to verify that they want to delete all the 
     //course assignment information
     public   boolean  deleteAll ()   {
         boolean  success  =   true ;
        
         OutputHelpers . showStandardDialog ( "All assignments deleted" ,   "Delete All Assignments" );
        
         return  success ;
     }
}

__MACOSX/assignment/source code/src/data/._AssignmentDB.java

assignment/source code/src/data/AuthenticationIO.java

assignment/source code/src/data/AuthenticationIO.java

package  data ;
import  business . Authentication ;
import  helpers . FileHelpers ;
import  helpers . OutputHelpers ;
import  helpers . StringHelpers ;
import  java . io . EOFException ;
import  java . io . FileInputStream ;
import  java . io . FileNotFoundException ;
import  java . io . FileOutputStream ;
import  java . io . IOException ;
import  java . io . ObjectInputStream ;
import  java . io . ObjectOutputStream ;
import  java . util . ArrayList ;

public   class   AuthenticationIO   {
     public   static   final   String  DEFAULT_FILE_NAME  =   "studentcred.dat" ;
     private   String  fileName ;
     private   static   final   String  DELIMTER  =   "," ;
    
     public   AuthenticationIO ()   {
        setFileName ( fileName );
     }
     public   final   void  setFileName ( String  fileName )   {
         if   ( StringHelpers . IsNullOrEmpty ( fileName ))   {
            fileName  =  DEFAULT_FILE_NAME ;
         }
         else   {
             this . fileName  =  fileName ;
         }
     }
     public   Authentication  getAuthentication ()   {
         Authentication  storedAuth  =   null ;
         ArrayList < String >  recordList ;
         String []  fields ;
         if   ( StringHelpers . IsNullOrEmpty ( fileName ))   {
            fileName  =  DEFAULT_FILE_NAME ;
         }
        recordList  =   FileHelpers . readList ( fileName );
        
         if   ( recordList  !=   null   &&   ! recordList . isEmpty ())   {
            fields  =  recordList . get ( 0 ). split ( DELIMTER );
             if   ( fields . length  ==   2 )   {
                storedAuth  =   new   Authentication ( fields [ 0 ],  fields [ 1 ]);
             }
         }
         return  storedAuth ;
     }
     public   boolean  createAuthenticationFile ( Authentication  newAuth )   {
         boolean  success  =   false ;
         StringBuilder  str  =   new   StringBuilder ();
        
         //TODO:  write the code to create a comma delimited username,password pair and write
         //the record to the file
        
         return  success ;
     }
}

__MACOSX/assignment/source code/src/data/._AuthenticationIO.java

assignment/source code/src/data/CourseDB.java

assignment/source code/src/data/CourseDB.java

package  data ;
import  helpers . * ;
import  business . Course ;
import  business . Authentication ;
import  java . util . ArrayList ;

public   class   CourseDB   extends   DataBaseParent {
     public   CourseDB ()   {
        super ();
     }
     public   CourseDB ( Authentication  authentication )   {
        super ( "Course" ,  authentication );
     }
     //TODO:  write the code to save the course information to the database
     public   boolean  save ( Course  aCourse )   {
         boolean  success  =   true ;
        
         OutputHelpers . showStandardDialog ( aCourse . toString ()   +   " saved" ,   "Save Course" );
        
         return  success ;
     }
     //TODO: write the code to delete the course information from the database
     public   boolean  delete ( Course  aCourse )   {
         boolean  success  =   true ;
        
         OutputHelpers . showStandardDialog ( aCourse . toString ()   +   " deleted" ,   "Delete Course" );
        
         return  success ;
     }
     //TODO: write the code to update the course information from the database
     public   boolean  update ( Course  aCourse )   {
         boolean  success  =   true ;
        
         OutputHelpers . showStandardDialog ( aCourse . toString ()   +   " updated" ,   "Update Course" );
        
         return  success ;
     }
     //TODO:  write the code to get the course list from the datbase
     public   ArrayList < Course >  getList ()   {
         ArrayList < Course >  courseList  =   new   ArrayList <> ();
        
        courseList . add ( new   Course ( - 1 ));
        courseList . add ( new   Course ( - 1 ,  
                                     "DeVry University" ,  
                                     "CIS247A" ,  
                                     "Object Oriented Programming with C#" ,
                                     8 ));
        courseList . add ( new   Course ( - 1 ,  
                                     "DeVry University" ,  
                                     "CIS170a" ,  
                                     "Structured Programming with C#" ,
                                     16 ));
        
        courseList . add ( new   Course ( - 1 ,
                                     "DeVry University" ,
                                     "CIS363A" ,
                                     "Web Interface Design" ,
                                     10 ));
        
         return  courseList ;
     }
     //TODO: write the code to delete all courses from the database
     //ensuring that the user is prompted to verify that they want to delete all the 
     //course assignment information
     //keeping in mind that this will also delete all assignments for the course as well
     public   boolean  deleteAll ()   {
         boolean  success  =   true ;
        
         OutputHelpers . showStandardDialog ( "All courses deleted" ,   "Delete all Assignments" );
        
         return  success ;
     }
}

__MACOSX/assignment/source code/src/data/._CourseDB.java

assignment/source code/src/data/DataBaseParent.java

assignment/source code/src/data/DataBaseParent.java

package  data ;
import  helpers . * ;
import  business . Authentication ;
import  java . util . ArrayList ;

public   abstract   class   DataBaseParent   {
    
     //TODO:  set the connection string to point to your MySql server and database
     private   final   String  CONNECTION_STRING  =   "jdbc:mysql://devry.edupe.net:4300/CIS355A_1011" ;
    
     protected   String  table ;
     protected   Authentication  authentication ;
    
     private   ConnectionHelper  connHelper ;
    
     public   DataBaseParent ()   {
         connHelper  =   new   ConnectionHelper ();
     }
     public   DataBaseParent ( String  table ,   Authentication  authentication )   {  
         this ();
        setTableName ( table );
         this . authentication  =  authentication ;
        setConnection ();
        
     }
     protected   void  setConnection ()   {
         if   ( authentication . authenticate ())   {
             connHelper . setConnection ( CONNECTION_STRING ,  authentication . getUserName (),  authentication . getPassword ());
         }
         else   {
             OutputHelpers . showExceptionDialog ( "Database credentials invalid" ,   "Invalid Database Credentials" );
         }
     }
     public   void  setTableName ( String  table )   {
         this . table  =   StringHelpers . setStringValue ( table ,   "" );
     }
 
}  

__MACOSX/assignment/source code/src/data/._DataBaseParent.java

__MACOSX/assignment/source code/src/._data

assignment/source code/src/presentation/pnlAssignments.form

__MACOSX/assignment/source code/src/presentation/._pnlAssignments.form

assignment/source code/src/presentation/pnlAssignments.java

assignment/source code/src/presentation/pnlAssignments.java


package  presentation ;

import  business . Authentication ;
import  helpers . GUIUtilities ;
import  helpers . InputHelpers ;
import  helpers . OutputHelpers ;
import  business . Course ;

/**
 *
 *  @author  Tevis
 */
public   class  pnlAssignments  extends  javax . swing . JPanel   {

     private   Scores_Main  mainForm ;
     private   int  week ;
     private   Course  course ;
     private   Authentication  authentication ;
    
     public  pnlAssignments ()   {
        initComponents ();
     }
     public  pnlAssignments ( Scores_Main  mainForm ,   Course  course ,   int  week )   {
         this ();
         this . mainForm  =  mainForm ;
         this . week  =  week ;
         this . course  =  course ;
        setWeekInformation ();
     }
     public   int  getWeek ()   {
         return  week ;
     }
     private   void  setWeekInformation ()   {
         String  title  =   "Enter Week "   +  week  +   " Scores for "   +  course . getNumber ();
        lblDirections . setText ( title );
        
        txtTDAScore . setText ( OutputHelpers . formattedInteger ( mainForm . getTDAMaxScore ()));
        lblTDAMax . setText ( "/"   +  mainForm . getTDAMaxScore ());
        
        txtQuizScore . setText ( OutputHelpers . formattedInteger ( mainForm . getMaxQuizScore ()));
        lblQuizMax . setText ( "/"   +  mainForm . getMaxQuizScore ());
        
        txtLabScore . setText ( OutputHelpers . formattedInteger ( mainForm . getMaxLabScore ()));
        lblLabMax . setText ( "/"   +  mainForm . getMaxLabScore ());
        
        txtTestScore . setText ( "" );
        lblTestMax . setText ( "/"   +  mainForm . getMaxTestScore ());
     }
    
     private   void  setAttendance ( int  dayNum ,   boolean  wasThere )   {
        mainForm . setAttendance ( week ,  dayNum ,  wasThere );
        txtTDAScore . setText ( OutputHelpers . formattedInteger ( mainForm . getCalculatedAttendance ( week )));
     }
     public   void  saveAssignmentInformation ()   {
         //TODO:  call back to the main form and save the current week's assignment information
         OutputHelpers . showStandardDialog ( mainForm . getWeekAssignmentDetails ( week ),   "Week Information Saved" );
     }
     public   void  clearAssignmentInformation ()   {
         GUIUtilities . clearInputFields ( pnlTDA );
         GUIUtilities . clearInputFields ( pnlQuiz );
         // TODO: clear the input fields in the lab panel
  
        mainForm . clearScores ( week );
     }

     /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @ SuppressWarnings ( "unchecked" )
     // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
     private   void  initComponents ()   {

        lblDirections  =   new  javax . swing . JLabel ();
        pnlTDA  =   new  javax . swing . JPanel ();
        chkDay1  =   new  javax . swing . JCheckBox ();
        chkDay2  =   new  javax . swing . JCheckBox ();
        chkDay3  =   new  javax . swing . JCheckBox ();
        chkDay4  =   new  javax . swing . JCheckBox ();
        chkDay5  =   new  javax . swing . JCheckBox ();
        chkDay6  =   new  javax . swing . JCheckBox ();
        chkDay7  =   new  javax . swing . JCheckBox ();
        jLabel1  =   new  javax . swing . JLabel ();
        txtTDAScore  =   new  javax . swing . JTextField ();
        lblTDAMax  =   new  javax . swing . JLabel ();
        pnlQuiz  =   new  javax . swing . JPanel ();
        txtQuizScore  =   new  javax . swing . JTextField ();
        jLabel2  =   new  javax . swing . JLabel ();
        lblQuizMax  =   new  javax . swing . JLabel ();
        pnlLab  =   new  javax . swing . JPanel ();
        txtLabScore  =   new  javax . swing . JTextField ();
        jLabel3  =   new  javax . swing . JLabel ();
        lblLabMax  =   new  javax . swing . JLabel ();
        btnSave  =   new  javax . swing . JButton ();
        btnClear  =   new  javax . swing . JButton ();
        pnlTest  =   new  javax . swing . JPanel ();
        txtTestScore  =   new  javax . swing . JTextField ();
        jLabel4  =   new  javax . swing . JLabel ();
        lblTestMax  =   new  javax . swing . JLabel ();

        setBorder ( javax . swing . BorderFactory . createLineBorder ( new  java . awt . Color ( 0 ,   0 ,   0 )));

        lblDirections . setFont ( new  java . awt . Font ( "Tahoma" ,   2 ,   12 ));   // NOI18N
        lblDirections . setForeground ( new  java . awt . Color ( 0 ,   0 ,   80 ));
        lblDirections . setText ( "Enter the attendance and assignment information" );
        lblDirections . setToolTipText ( "" );

        pnlTDA . setBorder ( javax . swing . BorderFactory . createTitledBorder ( null ,   "Daily Attendance/Participation" ,  javax . swing . border . TitledBorder . DEFAULT_JUSTIFICATION ,  javax . swing . border . TitledBorder . DEFAULT_POSITION ,   new  java . awt . Font ( "Tahoma" ,   1 ,   11 ),   new  java . awt . Color ( 0 ,   0 ,   80 )));   // NOI18N

        chkDay1 . setText ( "Sunday" );
        chkDay1 . addItemListener ( new  java . awt . event . ItemListener ()   {
             public   void  itemStateChanged ( java . awt . event . ItemEvent  evt )   {
                chkDay1ItemStateChanged ( evt );
             }
         });

        chkDay2 . setText ( "Monday" );
        chkDay2 . addItemListener ( new  java . awt . event . ItemListener ()   {
             public   void  itemStateChanged ( java . awt . event . ItemEvent  evt )   {
                chkDay2ItemStateChanged ( evt );
             }
         });

        chkDay3 . setText ( "Tuesday" );
        chkDay3 . setToolTipText ( "" );
        chkDay3 . addItemListener ( new  java . awt . event . ItemListener ()   {
             public   void  itemStateChanged ( java . awt . event . ItemEvent  evt )   {
                chkDay3ItemStateChanged ( evt );
             }
         });

        chkDay4 . setText ( "Wednesday" );
        chkDay4 . addItemListener ( new  java . awt . event . ItemListener ()   {
             public   void  itemStateChanged ( java . awt . event . ItemEvent  evt )   {
                chkDay4ItemStateChanged ( evt );
             }
         });

        chkDay5 . setText ( "Thursday" );
        chkDay5 . addItemListener ( new  java . awt . event . ItemListener ()   {
             public   void  itemStateChanged ( java . awt . event . ItemEvent  evt )   {
                chkDay5ItemStateChanged ( evt );
             }
         });

        chkDay6 . setText ( "Friday" );
        chkDay6 . addItemListener ( new  java . awt . event . ItemListener ()   {
             public   void  itemStateChanged ( java . awt . event . ItemEvent  evt )   {
                chkDay6ItemStateChanged ( evt );
             }
         });

        chkDay7 . setText ( "Saturday" );
        chkDay7 . addItemListener ( new  java . awt . event . ItemListener ()   {
             public   void  itemStateChanged ( java . awt . event . ItemEvent  evt )   {
                chkDay7ItemStateChanged ( evt );
             }
         });

        jLabel1 . setForeground ( new  java . awt . Color ( 0 ,   0 ,   80 ));
        jLabel1 . setText ( "Score" );

        txtTDAScore . setToolTipText ( "Enter the score for the participation/attendance" );
        txtTDAScore . addFocusListener ( new  java . awt . event . FocusAdapter ()   {
             public   void  focusLost ( java . awt . event . FocusEvent  evt )   {
                txtTDAScoreFocusLost ( evt );
             }
         });

        lblTDAMax . setForeground ( new  java . awt . Color ( 0 ,   0 ,   80 ));
        lblTDAMax . setText ( "/30" );

        javax . swing . GroupLayout  pnlTDALayout  =   new  javax . swing . GroupLayout ( pnlTDA );
        pnlTDA . setLayout ( pnlTDALayout );
        pnlTDALayout . setHorizontalGroup (
            pnlTDALayout . createParallelGroup ( javax . swing . GroupLayout . Alignment . LEADING )
             . addGroup ( pnlTDALayout . createSequentialGroup ()
                 . addContainerGap ()
                 . addGroup ( pnlTDALayout . createParallelGroup ( javax . swing . GroupLayout . Alignment . LEADING )
                     . addGroup ( pnlTDALayout . createSequentialGroup ()
                         . addComponent ( chkDay1 )
                         . addPreferredGap ( javax . swing . LayoutStyle . ComponentPlacement . UNRELATED )
                         . addComponent ( chkDay2 )
                         . addPreferredGap ( javax . swing . LayoutStyle . ComponentPlacement . UNRELATED )
                         . addComponent ( chkDay3 )
                         . addPreferredGap ( javax . swing . LayoutStyle . ComponentPlacement . UNRELATED )
                         . addComponent ( chkDay4 )
                         . addPreferredGap ( javax . swing . LayoutStyle . ComponentPlacement . UNRELATED )
                         . addComponent ( chkDay5 )
                         . addPreferredGap ( javax . swing . LayoutStyle . ComponentPlacement . UNRELATED )
                         . addComponent ( chkDay6 )
                         . addPreferredGap ( javax . swing . LayoutStyle . ComponentPlacement . UNRELATED )
                         . addComponent ( chkDay7 ))
                     . addGroup ( pnlTDALayout . createSequentialGroup ()
                         . addComponent ( jLabel1 )
                         . addPreferredGap ( javax . swing . LayoutStyle . ComponentPlacement . UNRELATED )
                         . addComponent ( txtTDAScore ,  javax . swing . GroupLayout . PREFERRED_SIZE ,   50 ,  javax . swing . GroupLayout . PREFERRED_SIZE )
                         . addPreferredGap ( javax . swing . LayoutStyle . ComponentPlacement . RELATED )
                         . addComponent ( lblTDAMax )))
                 . addContainerGap ( 16 ,   Short . MAX_VALUE ))
         );
        pnlTDALayout . setVerticalGroup (
            pnlTDALayout . createParallelGroup ( javax . swing . GroupLayout . Alignment . LEADING )
             . addGroup ( pnlTDALayout . createSequentialGroup ()
                 . addContainerGap ()
                 . addGroup ( pnlTDALayout . createParallelGroup ( javax . swing . GroupLayout . Alignment . BASELINE )
                     . addComponent ( chkDay1 )
                     . addComponent ( chkDay2 )
                     . addComponent ( chkDay3 )
                     . addComponent ( chkDay4 )
                     . addComponent ( chkDay5 )
                     . addComponent ( chkDay6 )
                     . addComponent ( chkDay7 ))
                 . addGap ( 11 ,   11 ,   11 )
                 . addGroup ( pnlTDALayout . createParallelGroup ( javax . swing . GroupLayout . Alignment . LEADING )
                     . addComponent ( jLabel1 )
                     . addGroup ( pnlTDALayout . createParallelGroup ( javax . swing . GroupLayout . Alignment . BASELINE )
                         . addComponent ( txtTDAScore ,  javax . swing . GroupLayout . PREFERRED_SIZE ,  javax . swing . GroupLayout . DEFAULT_SIZE ,  javax . swing . GroupLayout . PREFERRED_SIZE )
                         . addComponent ( lblTDAMax )))
                 . addContainerGap ( javax . swing . GroupLayout . DEFAULT_SIZE ,   Short . MAX_VALUE ))
         );

        pnlQuiz . setBorder ( javax . swing . BorderFactory . createTitledBorder ( null ,   "Quiz" ,  javax . swing . border . TitledBorder . DEFAULT_JUSTIFICATION ,  javax . swing . border . TitledBorder . DEFAULT_POSITION ,   new  java . awt . Font ( "Tahoma" ,   1 ,   11 ),   new  java . awt . Color ( 0 ,   0 ,   80 )));   // NOI18N

        txtQuizScore . setToolTipText ( "Enter the score for the quiz" );
        txtQuizScore . addFocusListener ( new  java . awt . event . FocusAdapter ()   {
             public   void  focusLost ( java . awt . event . FocusEvent  evt )   {
                txtQuizScoreFocusLost ( evt );
             }
         });

        jLabel2 . setForeground ( new  java . awt . Color ( 0 ,   0 ,   80 ));
        jLabel2 . setText ( "Score" );

        lblQuizMax . setForeground ( new  java . awt . Color ( 0 ,   0 ,   80 ));
        lblQuizMax . setText ( "/30" );

        javax . swing . GroupLayout  pnlQuizLayout  =   new  javax . swing . GroupLayout ( pnlQuiz );
        pnlQuiz . setLayout ( pnlQuizLayout );
        pnlQuizLayout . setHorizontalGroup (
            pnlQuizLayout . createParallelGroup ( javax . swing . GroupLayout . Alignment . LEADING )
             . addGroup ( pnlQuizLayout . createSequentialGroup ()
                 . addContainerGap ()
                 . addComponent ( jLabel2 )
                 . addPreferredGap ( javax . swing . LayoutStyle . ComponentPlacement . UNRELATED )
                 . addComponent ( txtQuizScore ,  javax . swing . GroupLayout . PREFERRED_SIZE ,   50 ,  javax . swing . GroupLayout . PREFERRED_SIZE )
                 . addPreferredGap ( javax . swing . LayoutStyle . ComponentPlacement . RELATED )
                 . addComponent ( lblQuizMax )
                 . addContainerGap ( 58 ,   Short . MAX_VALUE ))
         );
        pnlQuizLayout . setVerticalGroup (
            pnlQuizLayout . createParallelGroup ( javax . swing . GroupLayout . Alignment . LEADING )
             . addGroup ( pnlQuizLayout . createSequentialGroup ()
                 . addContainerGap ()
                 . addGroup ( pnlQuizLayout . createParallelGroup ( javax . swing . GroupLayout . Alignment . BASELINE )
                     . addComponent ( jLabel2 )
                     . addComponent ( txtQuizScore ,  javax . swing . GroupLayout . PREFERRED_SIZE ,  javax . swing . GroupLayout . DEFAULT_SIZE ,  javax . swing . GroupLayout . PREFERRED_SIZE )
                     . addComponent ( lblQuizMax ))
                 . addContainerGap ( javax . swing . GroupLayout . DEFAULT_SIZE ,   Short . MAX_VALUE ))
         );

        pnlLab . setBorder ( javax . swing . BorderFactory . createTitledBorder ( null ,   "Lab" ,  javax . swing . border . TitledBorder . DEFAULT_JUSTIFICATION ,  javax . swing . border . TitledBorder . DEFAULT_POSITION ,   new  java . awt . Font ( "Tahoma" ,   1 ,   11 ),   new  java . awt . Color ( 0 ,   0 ,   80 )));   // NOI18N

        txtLabScore . setToolTipText ( "Enter the score for the lab" );
        txtLabScore . addFocusListener ( new  java . awt . event . FocusAdapter ()   {
             public   void  focusLost ( java . awt . event . FocusEvent  evt )   {
                txtLabScoreFocusLost ( evt );
             }
         });

        jLabel3 . setForeground ( new  java . awt . Color ( 0 ,   0 ,   80 ));
        jLabel3 . setText ( "Score" );

        lblLabMax . setForeground ( new  java . awt . Color ( 0 ,   0 ,   80 ));
        lblLabMax . setText ( "/30" );

        javax . swing . GroupLayout  pnlLabLayout  =   new  javax . swing . GroupLayout ( pnlLab );
        pnlLab . setLayout ( pnlLabLayout );
        pnlLabLayout . setHorizontalGroup (
            pnlLabLayout . createParallelGroup ( javax . swing . GroupLayout . Alignment . LEADING )
             . addGroup ( pnlLabLayout . createSequentialGroup ()
                 . addContainerGap ()
                 . addComponent ( jLabel3 )
                 . addPreferredGap ( javax . swing . LayoutStyle . ComponentPlacement . UNRELATED )
                 . addComponent ( txtLabScore ,  javax . swing . GroupLayout . PREFERRED_SIZE ,   50 ,  javax . swing . GroupLayout . PREFERRED_SIZE )
                 . addContainerGap ( 83 ,   Short . MAX_VALUE ))
             . addGroup ( pnlLabLayout . createParallelGroup ( javax . swing . GroupLayout . Alignment . LEADING )
                 . addGroup ( pnlLabLayout . createSequentialGroup ()
                     . addGap ( 103 ,   103 ,   103 )
                     . addComponent ( lblLabMax )
                     . addContainerGap ( 61 ,   Short . MAX_VALUE )))
         );
        pnlLabLayout . setVerticalGroup (
            pnlLabLayout . createParallelGroup ( javax . swing . GroupLayout . Alignment . LEADING )
             . addGroup ( pnlLabLayout . createSequentialGroup ()
                 . addContainerGap ()
                 . addGroup ( pnlLabLayout . createParallelGroup ( javax . swing . GroupLayout . Alignment . BASELINE )
                     . addComponent ( jLabel3 )
                     . addComponent ( txtLabScore ,  javax . swing . GroupLayout . PREFERRED_SIZE ,  javax . swing . GroupLayout . DEFAULT_SIZE ,  javax . swing . GroupLayout . PREFERRED_SIZE ))
                 . addContainerGap ( javax . swing . GroupLayout . DEFAULT_SIZE ,   Short . MAX_VALUE ))
             . addGroup ( pnlLabLayout . createParallelGroup ( javax . swing . GroupLayout . Alignment . LEADING )
                 . addGroup ( pnlLabLayout . createSequentialGroup ()
                     . addGap ( 14 ,   14 ,   14 )
                     . addComponent ( lblLabMax )
                     . addContainerGap ( 14 ,   Short . MAX_VALUE )))
         );

        btnSave . setForeground ( new  java . awt . Color ( 0 ,   0 ,   80 ));
        btnSave . setText ( "Save" );
        btnSave . setToolTipText ( "Click to save week's assignment information" );
        btnSave . addActionListener ( new  java . awt . event . ActionListener ()   {
             public   void  actionPerformed ( java . awt . event . ActionEvent  evt )   {
                btnSaveActionPerformed ( evt );
             }
         });

        btnClear . setForeground ( new  java . awt . Color ( 0 ,   0 ,   80 ));
        btnClear . setText ( "Clear" );
        btnClear . setToolTipText ( "Click to clear week's assignment information" );
        btnClear . addActionListener ( new  java . awt . event . ActionListener ()   {
             public   void  actionPerformed ( java . awt . event . ActionEvent  evt )   {
                btnClearActionPerformed ( evt );
             }
         });

        pnlTest . setBorder ( javax . swing . BorderFactory . createTitledBorder ( null ,   "Test" ,  javax . swing . border . TitledBorder . DEFAULT_JUSTIFICATION ,  javax . swing . border . TitledBorder . DEFAULT_POSITION ,   new  java . awt . Font ( "Tahoma" ,   1 ,   11 ),   new  java . awt . Color ( 0 ,   0 ,   80 )));   // NOI18N

        txtTestScore . setToolTipText ( "Enter the score for the quiz" );
        txtTestScore . addFocusListener ( new  java . awt . event . FocusAdapter ()   {
             public   void  focusLost ( java . awt . event . FocusEvent  evt )   {
                txtTestScoreFocusLost ( evt );
             }
         });

        jLabel4 . setForeground ( new  java . awt . Color ( 0 ,   0 ,   80 ));
        jLabel4 . setText ( "Score" );

        lblTestMax . setForeground ( new  java . awt . Color ( 0 ,   0 ,   80 ));
        lblTestMax . setText ( "/30" );

        javax . swing . GroupLayout  pnlTestLayout  =   new  javax . swing . GroupLayout ( pnlTest );
        pnlTest . setLayout ( pnlTestLayout );
        pnlTestLayout . setHorizontalGroup (
            pnlTestLayout . createParallelGroup ( javax . swing . GroupLayout . Alignment . LEADING )
             . addGroup ( pnlTestLayout . createSequentialGroup ()
                 . addContainerGap ()
                 . addComponent ( jLabel4 )
                 . addPreferredGap ( javax . swing . LayoutStyle . ComponentPlacement . UNRELATED )
                 . addComponent ( txtTestScore ,  javax . swing . GroupLayout . PREFERRED_SIZE ,   50 ,  javax . swing . GroupLayout . PREFERRED_SIZE )
                 . addPreferredGap ( javax . swing . LayoutStyle . ComponentPlacement . RELATED )
                 . addComponent ( lblTestMax )
                 . addContainerGap ( 58 ,   Short . MAX_VALUE ))
         );
        pnlTestLayout . setVerticalGroup (
            pnlTestLayout . createParallelGroup ( javax . swing . GroupLayout . Alignment . LEADING )
             . addGroup ( pnlTestLayout . createSequentialGroup ()
                 . addContainerGap ()
                 . addGroup ( pnlTestLayout . createParallelGroup ( javax . swing . GroupLayout . Alignment . BASELINE )
                     . addComponent ( jLabel4 )
                     . addComponent ( txtTestScore ,  javax . swing . GroupLayout . PREFERRED_SIZE ,  javax . swing . GroupLayout . DEFAULT_SIZE ,  javax . swing . GroupLayout . PREFERRED_SIZE )
                     . addComponent ( lblTestMax ))
                 . addContainerGap ( javax . swing . GroupLayout . DEFAULT_SIZE ,   Short . MAX_VALUE ))
         );

        javax . swing . GroupLayout  layout  =   new  javax . swing . GroupLayout ( this );
         this . setLayout ( layout );
        layout . setHorizontalGroup (
            layout . createParallelGroup ( javax . swing . GroupLayout . Alignment . LEADING )
             . addGroup ( layout . createSequentialGroup ()
                 . addContainerGap ()
                 . addGroup ( layout . createParallelGroup ( javax . swing . GroupLayout . Alignment . LEADING )
                     . addGroup ( layout . createSequentialGroup ()
                         . addGroup ( layout . createParallelGroup ( javax . swing . GroupLayout . Alignment . LEADING )
                             . addComponent ( pnlTDA ,  javax . swing . GroupLayout . DEFAULT_SIZE ,  javax . swing . GroupLayout . DEFAULT_SIZE ,   Short . MAX_VALUE )
                             . addGroup ( layout . createSequentialGroup ()
                                 . addGroup ( layout . createParallelGroup ( javax . swing . GroupLayout . Alignment . LEADING )
                                     . addComponent ( lblDirections )
                                     . addGroup ( layout . createSequentialGroup ()
                                         . addGap ( 4 ,   4 ,   4 )
                                         . addGroup ( layout . createParallelGroup ( javax . swing . GroupLayout . Alignment . LEADING )
                                             . addGroup ( layout . createSequentialGroup ()
                                                 . addComponent ( pnlQuiz ,  javax . swing . GroupLayout . PREFERRED_SIZE ,  javax . swing . GroupLayout . DEFAULT_SIZE ,  javax . swing . GroupLayout . PREFERRED_SIZE )
                                                 . addGap ( 18 ,   18 ,   18 )
                                                 . addComponent ( pnlLab ,  javax . swing . GroupLayout . PREFERRED_SIZE ,  javax . swing . GroupLayout . DEFAULT_SIZE ,  javax . swing . GroupLayout . PREFERRED_SIZE ))
                                             . addComponent ( pnlTest ,  javax . swing . GroupLayout . PREFERRED_SIZE ,  javax . swing . GroupLayout . DEFAULT_SIZE ,  javax . swing . GroupLayout . PREFERRED_SIZE ))))
                                 . addGap ( 0 ,   0 ,   Short . MAX_VALUE )))
                         . addContainerGap ())
                     . addGroup ( javax . swing . GroupLayout . Alignment . TRAILING ,  layout . createSequentialGroup ()
                         . addPreferredGap ( javax . swing . LayoutStyle . ComponentPlacement . RELATED ,  javax . swing . GroupLayout . DEFAULT_SIZE ,   Short . MAX_VALUE )
                         . addComponent ( btnSave ,  javax . swing . GroupLayout . PREFERRED_SIZE ,   125 ,  javax . swing . GroupLayout . PREFERRED_SIZE )
                         . addPreferredGap ( javax . swing . LayoutStyle . ComponentPlacement . RELATED )
                         . addComponent ( btnClear ,  javax . swing . GroupLayout . PREFERRED_SIZE ,   101 ,  javax . swing . GroupLayout . PREFERRED_SIZE )
                         . addGap ( 17 ,   17 ,   17 ))))
         );
        layout . setVerticalGroup (
            layout . createParallelGroup ( javax . swing . GroupLayout . Alignment . LEADING )
             . addGroup ( layout . createSequentialGroup ()
                 . addContainerGap ()
                 . addComponent ( lblDirections )
                 . addGap ( 18 ,   18 ,   18 )
                 . addComponent ( pnlTDA ,  javax . swing . GroupLayout . PREFERRED_SIZE ,  javax . swing . GroupLayout . DEFAULT_SIZE ,  javax . swing . GroupLayout . PREFERRED_SIZE )
                 . addPreferredGap ( javax . swing . LayoutStyle . ComponentPlacement . UNRELATED )
                 . addGroup ( layout . createParallelGroup ( javax . swing . GroupLayout . Alignment . LEADING )
                     . addGroup ( layout . createSequentialGroup ()
                         . addComponent ( pnlQuiz ,  javax . swing . GroupLayout . PREFERRED_SIZE ,  javax . swing . GroupLayout . DEFAULT_SIZE ,  javax . swing . GroupLayout . PREFERRED_SIZE )
                         . addPreferredGap ( javax . swing . LayoutStyle . ComponentPlacement . RELATED )
                         . addComponent ( pnlTest ,  javax . swing . GroupLayout . PREFERRED_SIZE ,  javax . swing . GroupLayout . DEFAULT_SIZE ,  javax . swing . GroupLayout . PREFERRED_SIZE ))
                     . addComponent ( pnlLab ,  javax . swing . GroupLayout . PREFERRED_SIZE ,  javax . swing . GroupLayout . DEFAULT_SIZE ,  javax . swing . GroupLayout . PREFERRED_SIZE ))
                 . addPreferredGap ( javax . swing . LayoutStyle . ComponentPlacement . RELATED ,  javax . swing . GroupLayout . DEFAULT_SIZE ,   Short . MAX_VALUE )
                 . addGroup ( layout . createParallelGroup ( javax . swing . GroupLayout . Alignment . BASELINE )
                     . addComponent ( btnSave )
                     . addComponent ( btnClear ))
                 . addContainerGap ())
         );
     } // </editor-fold>//GEN-END:initComponents

     private   void  chkDay1ItemStateChanged ( java . awt . event . ItemEvent  evt )   { //GEN-FIRST:event_chkDay1ItemStateChanged
         if   ( chkDay1 . isSelected ())   {
            setAttendance ( 1 ,   true );
         }
         else   {
            setAttendance ( 1 ,   false );
         }
     } //GEN-LAST:event_chkDay1ItemStateChanged

     private   void  chkDay2ItemStateChanged ( java . awt . event . ItemEvent  evt )   { //GEN-FIRST:event_chkDay2ItemStateChanged
         //TODO:  write the code to respond to the check box being selected
     } //GEN-LAST:event_chkDay2ItemStateChanged

     private   void  chkDay3ItemStateChanged ( java . awt . event . ItemEvent  evt )   { //GEN-FIRST:event_chkDay3ItemStateChanged
         //TODO:  write the code to respond to the check box being selected
     } //GEN-LAST:event_chkDay3ItemStateChanged

     private   void  chkDay4ItemStateChanged ( java . awt . event . ItemEvent  evt )   { //GEN-FIRST:event_chkDay4ItemStateChanged
         //TODO:  write the code to respond to the check box being selected
     } //GEN-LAST:event_chkDay4ItemStateChanged

     private   void  chkDay5ItemStateChanged ( java . awt . event . ItemEvent  evt )   { //GEN-FIRST:event_chkDay5ItemStateChanged
         if   ( chkDay5 . isSelected ())   {
            setAttendance ( 5 ,   true );
         }
         else   {
            setAttendance ( 5 ,   false );
         }
     } //GEN-LAST:event_chkDay5ItemStateChanged

     private   void  chkDay6ItemStateChanged ( java . awt . event . ItemEvent  evt )   { //GEN-FIRST:event_chkDay6ItemStateChanged
         if   ( chkDay6 . isSelected ())   {
            setAttendance ( 6 ,   true );
         }
         else   {
            setAttendance ( 6 ,   false );
         }
     } //GEN-LAST:event_chkDay6ItemStateChanged

     private   void  chkDay7ItemStateChanged ( java . awt . event . ItemEvent  evt )   { //GEN-FIRST:event_chkDay7ItemStateChanged
         if   ( chkDay7 . isSelected ())   {
            setAttendance ( 7 ,   true );
         }
         else   {
            setAttendance ( 7 ,   false );
         }
     } //GEN-LAST:event_chkDay7ItemStateChanged

     private   void  txtTDAScoreFocusLost ( java . awt . event . FocusEvent  evt )   { //GEN-FIRST:event_txtTDAScoreFocusLost
        mainForm . setTDAScore ( week ,   InputHelpers . parseIntegerField ( txtTDAScore ,  
                                                                   "TDA Score" ,  
                                                                  mainForm . getMinScore (),  
                                                                  mainForm . getTDAMaxScore ()));
     } //GEN-LAST:event_txtTDAScoreFocusLost

     private   void  txtQuizScoreFocusLost ( java . awt . event . FocusEvent  evt )   { //GEN-FIRST:event_txtQuizScoreFocusLost
         //TODO: write the code to retrieve and verify the quiz score from the form
         //ensure you call back to the main form to get the limits
        
     } //GEN-LAST:event_txtQuizScoreFocusLost

     private   void  txtLabScoreFocusLost ( java . awt . event . FocusEvent  evt )   { //GEN-FIRST:event_txtLabScoreFocusLost
        mainForm . setLabScore ( week ,   InputHelpers . parseIntegerField ( txtLabScore ,  
                                                                     "Lab score" ,   
                                                                    mainForm . getMinScore (),  
                                                                    mainForm . getMaxLabScore ()));
     } //GEN-LAST:event_txtLabScoreFocusLost

     private   void  btnSaveActionPerformed ( java . awt . event . ActionEvent  evt )   { //GEN-FIRST:event_btnSaveActionPerformed
        //TODO:  write the code to invoke this objects save method
     } //GEN-LAST:event_btnSaveActionPerformed

     private   void  btnClearActionPerformed ( java . awt . event . ActionEvent  evt )   { //GEN-FIRST:event_btnClearActionPerformed
       clearAssignmentInformation ();
     } //GEN-LAST:event_btnClearActionPerformed

     private   void  txtTestScoreFocusLost ( java . awt . event . FocusEvent  evt )   { //GEN-FIRST:event_txtTestScoreFocusLost
        mainForm . setTestScore ( week ,   InputHelpers . parseIntegerField ( txtTestScore ,  
                                                                    "Exam Score" ,
                                                                   mainForm . getMinScore (),
                                                                   mainForm . getMaxTestScore ()));
     } //GEN-LAST:event_txtTestScoreFocusLost


     // Variables declaration - do not modify//GEN-BEGIN:variables
     private  javax . swing . JButton  btnClear ;
     private  javax . swing . JButton  btnSave ;
     private  javax . swing . JCheckBox  chkDay1 ;
     private  javax . swing . JCheckBox  chkDay2 ;
     private  javax . swing . JCheckBox  chkDay3 ;
     private  javax . swing . JCheckBox  chkDay4 ;
     private  javax . swing . JCheckBox  chkDay5 ;
     private  javax . swing . JCheckBox  chkDay6 ;
     private  javax . swing . JCheckBox  chkDay7 ;
     private  javax . swing . JLabel  jLabel1 ;
     private  javax . swing . JLabel  jLabel2 ;
     private  javax . swing . JLabel  jLabel3 ;
     private  javax . swing . JLabel  jLabel4 ;
     private  javax . swing . JLabel  lblDirections ;
     private  javax . swing . JLabel  lblLabMax ;
     private  javax . swing . JLabel  lblQuizMax ;
     private  javax . swing . JLabel  lblTDAMax ;
     private  javax . swing . JLabel  lblTestMax ;
     private  javax . swing . JPanel  pnlLab ;
     private  javax . swing . JPanel  pnlQuiz ;
     private  javax . swing . JPanel  pnlTDA ;
     private  javax . swing . JPanel  pnlTest ;
     private  javax . swing . JTextField  txtLabScore ;
     private  javax . swing . JTextField  txtQuizScore ;
     private  javax . swing . JTextField  txtTDAScore ;
     private  javax . swing . JTextField  txtTestScore ;
     // End of variables declaration//GEN-END:variables
}

__MACOSX/assignment/source code/src/presentation/._pnlAssignments.java

assignment/source code/src/presentation/pnlAuthentication.form

__MACOSX/assignment/source code/src/presentation/._pnlAuthentication.form

assignment/source code/src/presentation/pnlAuthentication.java

assignment/source code/src/presentation/pnlAuthentication.java


package  presentation ;
import  helpers . * ;
public   class  pnlAuthentication  extends  javax . swing . JPanel   {

     Scores_Main  mainForm ;
    
     public  pnlAuthentication ()   {
        initComponents ();
     }
      public  pnlAuthentication ( Scores_Main  mainForm )   {
         this ();
         this . mainForm  =  mainForm ;
     }
      private   void  submitCredentials ()   {
          String  prompt  =   "" ;
          String  userName  =   "" ;
          String  password  =   "" ;
          boolean  valid  =   false ;
         
         userName  =  txtUserName . getText ();
          if   ( StringHelpers . IsNullOrEmpty ( userName ))   {
            valid  =   false ;
            prompt  =   "Please provide your user name" ;
             OutputHelpers . showExceptionDialog ( prompt ,   "Empty user name" );
            txtUserName . requestFocus ();
     }
     else   {
        valid  =   true ;
     }
          if   ( valid )   {
             password  =   new   String ( txtPassword . getPassword ());
              //TODO: write the algorithm to validate that the password is not empty
          }
          if   ( valid )   {
            mainForm . setUserName ( userName );
             //TODO:  call back to the main form and set the password
            mainForm . authenticate ();
          }
      }

     /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @ SuppressWarnings ( "unchecked" )
     // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
     private   void  initComponents ()   {

        jLabel1  =   new  javax . swing . JLabel ();
        txtUserName  =   new  javax . swing . JTextField ();
        jLabel2  =   new  javax . swing . JLabel ();
        txtPassword  =   new  javax . swing . JPasswordField ();
        btnSubmit  =   new  javax . swing . JButton ();

        setBorder ( javax . swing . BorderFactory . createTitledBorder ( null ,   "Enter your Credentials" ,  javax . swing . border . TitledBorder . DEFAULT_JUSTIFICATION ,  javax . swing . border . TitledBorder . DEFAULT_POSITION ,   new  java . awt . Font ( "Tahoma" ,   1 ,   12 ),   new  java . awt . Color ( 0 ,   0 ,   80 )));   // NOI18N

        jLabel1 . setForeground ( new  java . awt . Color ( 0 ,   0 ,   80 ));
        jLabel1 . setText ( "Username: " );

        txtUserName . setToolTipText ( "Enter your user name" );

        jLabel2 . setForeground ( new  java . awt . Color ( 0 ,   0 ,   80 ));
        jLabel2 . setText ( "Password:" );

        txtPassword . setToolTipText ( "Enter your password" );

        btnSubmit . setForeground ( new  java . awt . Color ( 0 ,   0 ,   80 ));
        btnSubmit . setText ( "Submit" );
        btnSubmit . setToolTipText ( "Click to authenticate your credentials" );
        btnSubmit . addActionListener ( new  java . awt . event . ActionListener ()   {
             public   void  actionPerformed ( java . awt . event . ActionEvent  evt )   {
                btnSubmitActionPerformed ( evt );
             }
         });

        javax . swing . GroupLayout  layout  =   new  javax . swing . GroupLayout ( this );
         this . setLayout ( layout );
        layout . setHorizontalGroup (
            layout . createParallelGroup ( javax . swing . GroupLayout . Alignment . LEADING )
             . addGroup ( layout . createSequentialGroup ()
                 . addGap ( 71 ,   71 ,   71 )
                 . addGroup ( layout . createParallelGroup ( javax . swing . GroupLayout . Alignment . LEADING ,   false )
                     . addGroup ( layout . createSequentialGroup ()
                         . addComponent ( jLabel1 )
                         . addPreferredGap ( javax . swing . LayoutStyle . ComponentPlacement . UNRELATED )
                         . addComponent ( txtUserName ,  javax . swing . GroupLayout . PREFERRED_SIZE ,   171 ,  javax . swing . GroupLayout . PREFERRED_SIZE ))
                     . addGroup ( layout . createSequentialGroup ()
                         . addComponent ( jLabel2 )
                         . addGap ( 18 ,   18 ,   18 )
                         . addGroup ( layout . createParallelGroup ( javax . swing . GroupLayout . Alignment . LEADING )
                             . addComponent ( btnSubmit ,  javax . swing . GroupLayout . DEFAULT_SIZE ,  javax . swing . GroupLayout . DEFAULT_SIZE ,   Short . MAX_VALUE )
                             . addComponent ( txtPassword ))))
                 . addContainerGap ( 162 ,   Short . MAX_VALUE ))
         );
        layout . setVerticalGroup (
            layout . createParallelGroup ( javax . swing . GroupLayout . Alignment . LEADING )
             . addGroup ( layout . createSequentialGroup ()
                 . addGap ( 45 ,   45 ,   45 )
                 . addGroup ( layout . createParallelGroup ( javax . swing . GroupLayout . Alignment . BASELINE )
                     . addComponent ( jLabel1 )
                     . addComponent ( txtUserName ,  javax . swing . GroupLayout . PREFERRED_SIZE ,  javax . swing . GroupLayout . DEFAULT_SIZE ,  javax . swing . GroupLayout . PREFERRED_SIZE ))
                 . addPreferredGap ( javax . swing . LayoutStyle . ComponentPlacement . UNRELATED )
                 . addGroup ( layout . createParallelGroup ( javax . swing . GroupLayout . Alignment . BASELINE )
                     . addComponent ( jLabel2 )
                     . addComponent ( txtPassword ,  javax . swing . GroupLayout . PREFERRED_SIZE ,  javax . swing . GroupLayout . DEFAULT_SIZE ,  javax . swing . GroupLayout . PREFERRED_SIZE ))
                 . addGap ( 18 ,   18 ,   18 )
                 . addComponent ( btnSubmit )
                 . addContainerGap ( 72 ,   Short . MAX_VALUE ))
         );
     } // </editor-fold>//GEN-END:initComponents

     private   void  btnSubmitActionPerformed ( java . awt . event . ActionEvent  evt )   { //GEN-FIRST:event_btnSubmitActionPerformed
        submitCredentials ();
     } //GEN-LAST:event_btnSubmitActionPerformed


     // Variables declaration - do not modify//GEN-BEGIN:variables
     private  javax . swing . JButton  btnSubmit ;
     private  javax . swing . JLabel  jLabel1 ;
     private  javax . swing . JLabel  jLabel2 ;
     private  javax . swing . JPasswordField  txtPassword ;
     private  javax . swing . JTextField  txtUserName ;
     // End of variables declaration//GEN-END:variables
}

__MACOSX/assignment/source code/src/presentation/._pnlAuthentication.java

assignment/source code/src/presentation/pnlCourse.form

__MACOSX/assignment/source code/src/presentation/._pnlCourse.form

assignment/source code/src/presentation/pnlCourse.java

assignment/source code/src/presentation/pnlCourse.java


package  presentation ;
import  javax . swing . DefaultListModel ;
import  business . * ;
import  data . CourseDB ;

public   class  pnlCourse  extends  javax . swing . JPanel   {

     private   Scores_Main  mainForm ;
     private   DefaultListModel < Course >  listModel ;
     private   CourseList  courseList ;
     private   Authentication  authentication ;
    
     public  pnlCourse ()   {
        initComponents ();
        listModel  =   new   DefaultListModel <> ();
        lstCourse . setModel ( listModel );
     }
     public  pnlCourse ( Scores_Main  mainForm ,   Authentication  authentication )   {
         this ();
         this . mainForm  =  mainForm ;
         this . authentication  =  authentication ;
        setCourseList ();
     }
     private   void  setCourseList ()   {
         int  numRecords ;
         if   ( courseList  ==   null )   {
            courseList  =   new   CourseList ( authentication );
         }
        numRecords  =  courseList . displayCourseList ( listModel );
     }
     private   void  setCourseInformation ()   {
         if   ( lstCourse . getSelectedIndex ()   !=   - 1 )   {
              //TODO: call back to the main form to build the tabs for the selected course
            mainForm . buildTabs ( lstCourse . getSelectedValue ());
         }
     }
     public   void  setCourseInformation ( Course  aCourse )   {
        txtCourse . setText ( aCourse . getTitle ());
        txtSchoolName . setText ( aCourse . getSchool ());
         //TODO:  set the course number text from the course object
     }
    
 
     /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @ SuppressWarnings ( "unchecked" )
     // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
     private   void  initComponents ()   {

        jButton1  =   new  javax . swing . JButton ();
        lblDirections  =   new  javax . swing . JLabel ();
        txtSchoolName  =   new  javax . swing . JTextField ();
        jLabel2  =   new  javax . swing . JLabel ();
        txtCourseNumber  =   new  javax . swing . JTextField ();
        txtCourse  =   new  javax . swing . JTextField ();
        jLabel3  =   new  javax . swing . JLabel ();
        jLabel7  =   new  javax . swing . JLabel ();
        jScrollPane2  =   new  javax . swing . JScrollPane ();
        lstCourse  =   new  javax . swing . JList <> ();
        btnAdd  =   new  javax . swing . JButton ();
        btnSave  =   new  javax . swing . JButton ();
        btnClear  =   new  javax . swing . JButton ();
        btnDelete  =   new  javax . swing . JButton ();
        jLabel1  =   new  javax . swing . JLabel ();

        jButton1 . setText ( "jButton1" );

        setBorder ( javax . swing . BorderFactory . createLineBorder ( new  java . awt . Color ( 0 ,   0 ,   80 )));
        setToolTipText ( "" );

        lblDirections . setFont ( new  java . awt . Font ( "Tahoma" ,   2 ,   12 ));   // NOI18N
        lblDirections . setForeground ( new  java . awt . Color ( 0 ,   0 ,   80 ));
        lblDirections . setText ( "Enter the schooll and course information" );
        lblDirections . setToolTipText ( "" );

        txtSchoolName . setToolTipText ( "Enter the name of the school" );
        txtSchoolName . addFocusListener ( new  java . awt . event . FocusAdapter ()   {
             public   void  focusLost ( java . awt . event . FocusEvent  evt )   {
                txtSchoolNameFocusLost ( evt );
             }
         });

        jLabel2 . setForeground ( new  java . awt . Color ( 0 ,   0 ,   80 ));
        jLabel2 . setText ( "Course #" );

        txtCourseNumber . setToolTipText ( "Enter the course number" );
        txtCourseNumber . addFocusListener ( new  java . awt . event . FocusAdapter ()   {
             public   void  focusLost ( java . awt . event . FocusEvent  evt )   {
                txtCourseNumberFocusLost ( evt );
             }
         });

        txtCourse . setToolTipText ( "Enter the course title" );
        txtCourse . addFocusListener ( new  java . awt . event . FocusAdapter ()   {
             public   void  focusLost ( java . awt . event . FocusEvent  evt )   {
                txtCourseFocusLost ( evt );
             }
         });

        jLabel3 . setForeground ( new  java . awt . Color ( 0 ,   0 ,   80 ));
        jLabel3 . setText ( "Title" );

        jLabel7 . setForeground ( new  java . awt . Color ( 0 ,   0 ,   80 ));
        jLabel7 . setText ( "Select" );

        lstCourse . setSelectionMode ( javax . swing . ListSelectionModel . SINGLE_SELECTION );
        lstCourse . addListSelectionListener ( new  javax . swing . event . ListSelectionListener ()   {
             public   void  valueChanged ( javax . swing . event . ListSelectionEvent  evt )   {
                lstCourseValueChanged ( evt );
             }
         });
        jScrollPane2 . setViewportView ( lstCourse );

        btnAdd . setForeground ( new  java . awt . Color ( 0 ,   0 ,   80 ));
        btnAdd . setText ( "Add" );
        btnAdd . setToolTipText ( "Click to add a new course" );
        btnAdd . setActionCommand ( "Add " );

        btnSave . setForeground ( new  java . awt . Color ( 0 ,   0 ,   80 ));
        btnSave . setText ( "Update" );
        btnSave . setToolTipText ( "Click to save student and course information" );

        btnClear . setForeground ( new  java . awt . Color ( 0 ,   0 ,   80 ));
        btnClear . setText ( "Clear" );
        btnClear . setToolTipText ( "Click to clear student and course information" );

        btnDelete . setForeground ( new  java . awt . Color ( 0 ,   0 ,   80 ));
        btnDelete . setText ( "Delete" );
        btnDelete . setToolTipText ( "Click to delete the course" );

        jLabel1 . setForeground ( new  java . awt . Color ( 0 ,   0 ,   80 ));
        jLabel1 . setText ( "School" );

        javax . swing . GroupLayout  layout  =   new  javax . swing . GroupLayout ( this );
         this . setLayout ( layout );
        layout . setHorizontalGroup (
            layout . createParallelGroup ( javax . swing . GroupLayout . Alignment . TRAILING )
             . addGroup ( layout . createSequentialGroup ()
                 . addContainerGap ()
                 . addGroup ( layout . createParallelGroup ( javax . swing . GroupLayout . Alignment . TRAILING )
                     . addComponent ( lblDirections ,  javax . swing . GroupLayout . Alignment . LEADING )
                     . addGroup ( javax . swing . GroupLayout . Alignment . LEADING ,  layout . createSequentialGroup ()
                         . addGap ( 14 ,   14 ,   14 )
                         . addComponent ( jLabel1 )
                         . addPreferredGap ( javax . swing . LayoutStyle . ComponentPlacement . RELATED )
                         . addComponent ( txtSchoolName ,  javax . swing . GroupLayout . PREFERRED_SIZE ,   517 ,  javax . swing . GroupLayout . PREFERRED_SIZE ))
                     . addGroup ( javax . swing . GroupLayout . Alignment . LEADING ,  layout . createSequentialGroup ()
                         . addGroup ( layout . createParallelGroup ( javax . swing . GroupLayout . Alignment . TRAILING )
                             . addComponent ( jLabel3 )
                             . addComponent ( jLabel2 )
                             . addComponent ( jLabel7 ))
                         . addGroup ( layout . createParallelGroup ( javax . swing . GroupLayout . Alignment . LEADING )
                             . addGroup ( layout . createSequentialGroup ()
                                 . addPreferredGap ( javax . swing . LayoutStyle . ComponentPlacement . RELATED )
                                 . addGroup ( layout . createParallelGroup ( javax . swing . GroupLayout . Alignment . LEADING )
                                     . addComponent ( jScrollPane2 )
                                     . addGroup ( layout . createSequentialGroup ()
                                         . addGroup ( layout . createParallelGroup ( javax . swing . GroupLayout . Alignment . LEADING )
                                             . addComponent ( txtCourse ,  javax . swing . GroupLayout . PREFERRED_SIZE ,   384 ,  javax . swing . GroupLayout . PREFERRED_SIZE )
                                             . addGroup ( layout . createSequentialGroup ()
                                                 . addComponent ( btnAdd ,  javax . swing . GroupLayout . PREFERRED_SIZE ,   83 ,  javax . swing . GroupLayout . PREFERRED_SIZE )
                                                 . addGap ( 18 ,   18 ,   18 )
                                                 . addComponent ( btnSave ,  javax . swing . GroupLayout . PREFERRED_SIZE ,   103 ,  javax . swing . GroupLayout . PREFERRED_SIZE )
                                                 . addGap ( 18 ,   18 ,   18 )
                                                 . addComponent ( btnClear ,  javax . swing . GroupLayout . PREFERRED_SIZE ,   103 ,  javax . swing . GroupLayout . PREFERRED_SIZE )
                                                 . addGap ( 31 ,   31 ,   31 )
                                                 . addComponent ( btnDelete ,  javax . swing . GroupLayout . PREFERRED_SIZE ,   103 ,  javax . swing . GroupLayout . PREFERRED_SIZE )))
                                         . addGap ( 0 ,   0 ,   Short . MAX_VALUE ))))
                             . addGroup ( layout . createSequentialGroup ()
                                 . addGap ( 4 ,   4 ,   4 )
                                 . addComponent ( txtCourseNumber ,  javax . swing . GroupLayout . PREFERRED_SIZE ,   121 ,  javax . swing . GroupLayout . PREFERRED_SIZE )
                                 . addGap ( 0 ,   0 ,   Short . MAX_VALUE )))))
                 . addContainerGap ())
         );
        layout . setVerticalGroup (
            layout . createParallelGroup ( javax . swing . GroupLayout . Alignment . LEADING )
             . addGroup ( layout . createSequentialGroup ()
                 . addContainerGap ()
                 . addComponent ( lblDirections )
                 . addPreferredGap ( javax . swing . LayoutStyle . ComponentPlacement . UNRELATED )
                 . addGroup ( layout . createParallelGroup ( javax . swing . GroupLayout . Alignment . BASELINE )
                     . addComponent ( jLabel1 )
                     . addComponent ( txtSchoolName ,  javax . swing . GroupLayout . PREFERRED_SIZE ,  javax . swing . GroupLayout . DEFAULT_SIZE ,  javax . swing . GroupLayout . PREFERRED_SIZE ))
                 . addPreferredGap ( javax . swing . LayoutStyle . ComponentPlacement . RELATED )
                 . addGroup ( layout . createParallelGroup ( javax . swing . GroupLayout . Alignment . BASELINE )
                     . addComponent ( jLabel2 )
                     . addComponent ( txtCourseNumber ,  javax . swing . GroupLayout . PREFERRED_SIZE ,  javax . swing . GroupLayout . DEFAULT_SIZE ,  javax . swing . GroupLayout . PREFERRED_SIZE ))
                 . addPreferredGap ( javax . swing . LayoutStyle . ComponentPlacement . RELATED )
                 . addGroup ( layout . createParallelGroup ( javax . swing . GroupLayout . Alignment . BASELINE )
                     . addComponent ( jLabel3 )
                     . addComponent ( txtCourse ,  javax . swing . GroupLayout . PREFERRED_SIZE ,  javax . swing . GroupLayout . DEFAULT_SIZE ,  javax . swing . GroupLayout . PREFERRED_SIZE ))
                 . addPreferredGap ( javax . swing . LayoutStyle . ComponentPlacement . RELATED )
                 . addGroup ( layout . createParallelGroup ( javax . swing . GroupLayout . Alignment . LEADING )
                     . addComponent ( jLabel7 )
                     . addComponent ( jScrollPane2 ,  javax . swing . GroupLayout . PREFERRED_SIZE ,   247 ,  javax . swing . GroupLayout . PREFERRED_SIZE ))
                 . addGap ( 18 ,   18 ,   Short . MAX_VALUE )
                 . addGroup ( layout . createParallelGroup ( javax . swing . GroupLayout . Alignment . LEADING )
                     . addComponent ( btnDelete )
                     . addGroup ( layout . createParallelGroup ( javax . swing . GroupLayout . Alignment . BASELINE )
                         . addComponent ( btnAdd )
                         . addComponent ( btnSave )
                         . addComponent ( btnClear )))
                 . addContainerGap ( javax . swing . GroupLayout . DEFAULT_SIZE ,   Short . MAX_VALUE ))
         );
     } // </editor-fold>//GEN-END:initComponents

     private   void  txtSchoolNameFocusLost ( java . awt . event . FocusEvent  evt )   { //GEN-FIRST:event_txtSchoolNameFocusLost
       mainForm . setSchoolName ( txtSchoolName . getText ());
     } //GEN-LAST:event_txtSchoolNameFocusLost

     private   void  txtCourseNumberFocusLost ( java . awt . event . FocusEvent  evt )   { //GEN-FIRST:event_txtCourseNumberFocusLost
        mainForm . setCourseNumber ( txtCourseNumber . getText ());
         // TODO: call back to the main form and set the course number 
     } //GEN-LAST:event_txtCourseNumberFocusLost

     private   void  txtCourseFocusLost ( java . awt . event . FocusEvent  evt )   { //GEN-FIRST:event_txtCourseFocusLost
        mainForm . setCourseTitle ( txtCourse . getText ());
     } //GEN-LAST:event_txtCourseFocusLost

     private   void  lstCourseValueChanged ( javax . swing . event . ListSelectionEvent  evt )   { //GEN-FIRST:event_lstCourseValueChanged
         if   ( ! evt . getValueIsAdjusting ())   {
             //TODO:  call the set course information method in this object to set the course informaton
   
         }
     } //GEN-LAST:event_lstCourseValueChanged


     // Variables declaration - do not modify//GEN-BEGIN:variables
     private  javax . swing . JButton  btnAdd ;
     private  javax . swing . JButton  btnClear ;
     private  javax . swing . JButton  btnDelete ;
     private  javax . swing . JButton  btnSave ;
     private  javax . swing . JButton  jButton1 ;
     private  javax . swing . JLabel  jLabel1 ;
     private  javax . swing . JLabel  jLabel2 ;
     private  javax . swing . JLabel  jLabel3 ;
     private  javax . swing . JLabel  jLabel7 ;
     private  javax . swing . JScrollPane  jScrollPane2 ;
     private  javax . swing . JLabel  lblDirections ;
     private  javax . swing . JList < Course >  lstCourse ;
     private  javax . swing . JTextField  txtCourse ;
     private  javax . swing . JTextField  txtCourseNumber ;
     private  javax . swing . JTextField  txtSchoolName ;
     // End of variables declaration//GEN-END:variables
}

__MACOSX/assignment/source code/src/presentation/._pnlCourse.java

assignment/source code/src/presentation/pnlSummary.form

__MACOSX/assignment/source code/src/presentation/._pnlSummary.form

assignment/source code/src/presentation/pnlSummary.java

assignment/source code/src/presentation/pnlSummary.java

package  presentation ;
import  business . Authentication ;
import  business . CourseList ;
import  business . CourseSummary ;
import  javax . swing . table . DefaultTableModel ;

public   class  pnlSummary  extends  javax . swing . JPanel   {

     private   CourseList  courseList ;
     private   Authentication  authentication ;
     private   DefaultTableModel  tableModel ;
    
     public  pnlSummary ()   {
        initComponents ();
     }
     public  pnlSummary ( Authentication  authentication )   {
         this ();
         this . authentication  =  authentication ;
        setTable ();
        
     }
     private   void  setTable ()   {
        courseList  =   new   CourseList ( authentication );
        tableModel  =   new   DefaultTableModel ();
        tableModel . setColumnIdentifiers ( courseList . getColumnNames ());
        tblsummary . setModel ( tableModel );
         CourseSummary  aSummary ;
         for ( CourseSummary  aCourse : courseList . summaryList ())   {
            addSummaryToTable ( aCourse );
         }
     }
     private   void  addSummaryToTable ( CourseSummary  summary )   {
         if   ( summary  !=   null )   {
             // TODO: create an object variables and set the course summary 
             //information and add the object to the table row.
          
         }
     }

     /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @ SuppressWarnings ( "unchecked" )
     // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
     private   void  initComponents ()   {

        lblDirections  =   new  javax . swing . JLabel ();
        jScrollPane1  =   new  javax . swing . JScrollPane ();
        tblsummary  =   new  javax . swing . JTable ();

        setBorder ( javax . swing . BorderFactory . createLineBorder ( new  java . awt . Color ( 0 ,   0 ,   80 )));

        lblDirections . setFont ( new  java . awt . Font ( "Tahoma" ,   2 ,   12 ));   // NOI18N
        lblDirections . setForeground ( new  java . awt . Color ( 0 ,   0 ,   80 ));
        lblDirections . setText ( "The course and grade summary" );
        lblDirections . setToolTipText ( "" );

        tblsummary . setModel ( new  javax . swing . table . DefaultTableModel (
             new   Object   [][]   {
                 { null ,   null ,   null ,   null },
                 { null ,   null ,   null ,   null },
                 { null ,   null ,   null ,   null },
                 { null ,   null ,   null ,   null }
             },
             new   String   []   {
                 "Title 1" ,   "Title 2" ,   "Title 3" ,   "Title 4"
             }
         ));
        jScrollPane1 . setViewportView ( tblsummary );

        javax . swing . GroupLayout  layout  =   new  javax . swing . GroupLayout ( this );
         this . setLayout ( layout );
        layout . setHorizontalGroup (
            layout . createParallelGroup ( javax . swing . GroupLayout . Alignment . LEADING )
             . addGroup ( layout . createSequentialGroup ()
                 . addContainerGap ()
                 . addGroup ( layout . createParallelGroup ( javax . swing . GroupLayout . Alignment . LEADING )
                     . addComponent ( lblDirections )
                     . addComponent ( jScrollPane1 ,  javax . swing . GroupLayout . PREFERRED_SIZE ,   595 ,  javax . swing . GroupLayout . PREFERRED_SIZE ))
                 . addContainerGap ( javax . swing . GroupLayout . DEFAULT_SIZE ,   Short . MAX_VALUE ))
         );
        layout . setVerticalGroup (
            layout . createParallelGroup ( javax . swing . GroupLayout . Alignment . LEADING )
             . addGroup ( layout . createSequentialGroup ()
                 . addContainerGap ()
                 . addComponent ( lblDirections )
                 . addPreferredGap ( javax . swing . LayoutStyle . ComponentPlacement . UNRELATED )
                 . addComponent ( jScrollPane1 ,  javax . swing . GroupLayout . PREFERRED_SIZE ,   315 ,  javax . swing . GroupLayout . PREFERRED_SIZE )
                 . addContainerGap ( javax . swing . GroupLayout . DEFAULT_SIZE ,   Short . MAX_VALUE ))
         );
     } // </editor-fold>//GEN-END:initComponents


     // Variables declaration - do not modify//GEN-BEGIN:variables
     private  javax . swing . JScrollPane  jScrollPane1 ;
     private  javax . swing . JLabel  lblDirections ;
     private  javax . swing . JTable  tblsummary ;
     // End of variables declaration//GEN-END:variables
}

__MACOSX/assignment/source code/src/presentation/._pnlSummary.java

assignment/source code/src/presentation/Scores_Main.form

__MACOSX/assignment/source code/src/presentation/._Scores_Main.form

assignment/source code/src/presentation/Scores_Main.java

assignment/source code/src/presentation/Scores_Main.java

package  presentation ;
import  helpers . * ;
import  business . * ;
import  java . util . ArrayList ;

//TODO:  modify the menus so they mirror the buttons on a form
/*
For this action item, you will need to add the appropriate menu items
to each of the menus, one for each button that is on the form.

Keep in mind these menu and sub panel form operations will require
communications and call backs between the main form and the subform


*/

public   class   Scores_Main   extends  javax . swing . JFrame   {

     private   ClassAssignments  classAssignments ;
    
     private  pnlCourse courseInformation ;
     private  pnlAssignments currentAssignment ;
     private  pnlAuthentication authenticatePanel ;
     private   Authentication  authentication ;
    
     private   ArrayList < pnlAssignments >  panelList  =   new   ArrayList <> ();
    
     private   Authentication  credentials ;
    
     public   Scores_Main ()   {
        initComponents ();
        buildAuthenticateTab ();
     }
    
     /************** Authentication operations ***************************/
     private   void  buildAuthenticateTab ()   {
        clearTabs ();
        enableTotalsPanel ( false );
        authenticatePanel  =   new  pnlAuthentication ( this );
        tbMain . add ( "Authenticate" ,  authenticatePanel );
        authentication  =   new   Authentication ();
     }
     public   void  setUserName ( String  userName )   {
       authentication . setUserName ( userName );
     }
     public   void  setPassWord ( String  passWord )   {
        authentication . setPassword ( passWord );
     }
     public   void  authenticate ()   {
         if   ( authentication . authenticate ())   {
            buildCourseTab ();
            enableTotalsPanel ( true );
         }
         else   {
             OutputHelpers . showExceptionDialog ( "Invalid user credentials--try again!" ,   "Invalid Credentials" );
         }   
     }
     private   void  buildCourseTab ()   {
        clearTabs ();
        tbMain . addTab ( "Course Info" ,   new  pnlCourse ( this ,  authentication ));
     }
     public   void  buildTabs ( Course  course )   {
       
        clearTabs ();
        pnlCourse coursePanel  =   new  pnlCourse ( this ,  authentication );
        tbMain . addTab ( "Course Info" ,  coursePanel );
        classAssignments  =   new   ClassAssignments ( course ,  authentication );
         for ( int  i  =   1 ;  i  <=  classAssignments . getNumberWeeks ();  i ++ )   {
             // TODO:  instaniate the current assignment as a new
             //pnlAssignments, making sure you pass in all the required information
             //to the constructor,  then add the current assignment panel to the tab 
            
            
             //this just holds a list of the panels so can figure out
             //which one is selected
            panelList . add ( currentAssignment );
           
         }
        tbMain . add ( "Summary" ,   new  pnlSummary ( authentication ));
        coursePanel . setCourseInformation ( course );
        currentAssignment  =   null ;
     }
     private   void  clearTabs ()   {

         if   ( tbMain . getTabCount ()   >=   1 )   {
              tbMain . removeAll ();
         }
     }
     private   void  selectTab ()   {
         int  index  =  tbMain . getSelectedIndex ();
         if   ( index == 0 )   {
            enableAssignmentsMenu ( false );
            enableCourseMenu ( true );
            currentAssignment  =   null ;
         }
         else   if   ( index  >=   1   )   {
            enableAssignmentsMenu ( true );
            enableCourseMenu ( false );
            
             // TODO: set the current assignment panel to the selected
            
         }
     }
     private   void  enableAssignmentsMenu ( Boolean  enable )   {
        mnuAssignments . setEnabled ( enable );
     }
     private   void  enableCourseMenu ( Boolean  enable )   {
        mnuCourse . setEnabled ( enable );
     }
     private   void  enableTotalsPanel ( Boolean  enable )   {
        pnlTotals . setVisible ( enable );
     }
     /************* course information **************************/
     public   void  setSchoolName ( String  title )   {
        classAssignments . setCourseTitle ( title );
     }
     public   void  setCourseNumber ( String  courseNumber )   {
        classAssignments . setCourseNumber ( courseNumber );
     }
     public   void  setCourseTitle ( String  title )   {
         //TODO: set the course title in the classAssignment object

     }
    
     /*************  weekly assignment information ***************/
    
     public   int  getMinScore ()   {
         return  classAssignments . getMinScore ();
     }
    
     public   void  setAttendance ( int  weekNum ,   int  dayNum ,   boolean  wasThere )   {
        classAssignments . setAttendance ( weekNum ,  dayNum ,  wasThere );
        setTotals ();
     }
     public   int  getCalculatedAttendance ( int  weekNumber )   {
         return  classAssignments . getCalculatedAttendance ( weekNumber );
     }
     public   int  getTDAMaxScore ()   {
         return  classAssignments . getMAXTDAScore ();
     }
     public   void  setTDAScore ( int  weekNum ,   int  score )   {
        classAssignments . setTDAScore ( weekNum ,  score );
        setTotals ();
     }
     public   int  getMaxQuizScore ()   {
         return  classAssignments . getMaxQuizScore ();
     }
     public   void  setQuizScore ( int  weekNum ,   int  score )   {
         //TODO:  set the quiz score in the class assignments object
         //then set the course totals
        
     }
     public   int  getMaxLabScore ()   {
         return  classAssignments . getMAXLabScore ();
     }
     public   void  setLabScore ( int  weekNum ,   int  score )   {
        classAssignments . setLabScore ( weekNum ,  score );
        setTotals ();
     }
     public   String  getWeekAssignmentDetails ( int  weekNum )   {
         return  classAssignments . getWeekAssignmentInformation ( weekNum );
     }
     public   int  getMaxTestScore ()   {
         return  classAssignments . getMaxTestScore ();
     }
     public   void  setTestScore ( int  weekNum ,   int  score )   {
        classAssignments . setTestScore ( weekNum ,  score );
        setTotals ();
     }
    
     /***************** Application Operations *********************/
    
     private   void  saveInformation ()   {
         OutputHelpers . showStandardDialog ( classAssignments . toString (),   "Assignment Information" );
     }
     private   void  exitApplication ()   {
         //TODO:  terminate the application with a dialog box
     }
     public   void  saveAssignmentInformation ()   {
         if   ( currentAssignment  !=   null )   {
            currentAssignment . saveAssignmentInformation ();
         }
     }
     private   void  clearAssignmentInformation ()   {
         if   ( currentAssignment  !=   null )   {
            currentAssignment . clearAssignmentInformation ();
           
         }
     }
     public   void  clearScores ( int  weekNumber )   {
        classAssignments . clearScores ( weekNumber );
        setTotals ();
     }
    
     /**************** total information ****************************/
     private   void  setTotals ()   {
        txtTotal . setText ( OutputHelpers . formattedInteger ( classAssignments . getTotalScore ()));
        txtPercent . setText ( OutputHelpers . formattedPercent ( classAssignments . getPercent (),   0 ));
        txtGrade . setText ( classAssignments . getGrade ());
     }

     /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @ SuppressWarnings ( "unchecked" )
     // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
     private   void  initComponents ()   {

        jScrollPane1  =   new  javax . swing . JScrollPane ();
        jTextArea1  =   new  javax . swing . JTextArea ();
        jLabel1  =   new  javax . swing . JLabel ();
        jLabel2  =   new  javax . swing . JLabel ();
        tbMain  =   new  javax . swing . JTabbedPane ();
        btnSave  =   new  javax . swing . JButton ();
        btnExit  =   new  javax . swing . JButton ();
        pnlTotals  =   new  javax . swing . JPanel ();
        jLabel3  =   new  javax . swing . JLabel ();
        txtTotal  =   new  javax . swing . JTextField ();
        jLabel4  =   new  javax . swing . JLabel ();
        txtPercent  =   new  javax . swing . JTextField ();
        jLabel5  =   new  javax . swing . JLabel ();
        txtGrade  =   new  javax . swing . JTextField ();
        jMenuBar1  =   new  javax . swing . JMenuBar ();
        mnuFile  =   new  javax . swing . JMenu ();
        mnuSave  =   new  javax . swing . JMenuItem ();
        jSeparator1  =   new  javax . swing . JPopupMenu . Separator ();
        mnuExit  =   new  javax . swing . JMenuItem ();
        mnuCourse  =   new  javax . swing . JMenu ();
        mnuAssignments  =   new  javax . swing . JMenu ();
        mnuSaveAssignment  =   new  javax . swing . JMenuItem ();
        mnuClear  =   new  javax . swing . JMenuItem ();

        jTextArea1 . setColumns ( 20 );
        jTextArea1 . setRows ( 5 );
        jScrollPane1 . setViewportView ( jTextArea1 );

        setDefaultCloseOperation ( javax . swing . WindowConstants . EXIT_ON_CLOSE );

        jLabel1 . setFont ( new  java . awt . Font ( "Tahoma" ,   1 ,   14 ));   // NOI18N
        jLabel1 . setForeground ( new  java . awt . Color ( 0 ,   0 ,   80 ));
        jLabel1 . setText ( "Welcome to the Student Grade Program" );

        jLabel2 . setFont ( new  java . awt . Font ( "Tahoma" ,   2 ,   12 ));   // NOI18N
        jLabel2 . setForeground ( new  java . awt . Color ( 0 ,   0 ,   80 ));
        jLabel2 . setText ( "Enter the students name and assignment scores for each week" );

        tbMain . addChangeListener ( new  javax . swing . event . ChangeListener ()   {
             public   void  stateChanged ( javax . swing . event . ChangeEvent  evt )   {
                tbMainStateChanged ( evt );
             }
         });

        btnSave . setForeground ( new  java . awt . Color ( 0 ,   0 ,   80 ));
        btnSave . setText ( "Save" );
        btnSave . setToolTipText ( "Click to save the information" );
        btnSave . addActionListener ( new  java . awt . event . ActionListener ()   {
             public   void  actionPerformed ( java . awt . event . ActionEvent  evt )   {
                btnSaveActionPerformed ( evt );
             }
         });

        btnExit . setForeground ( new  java . awt . Color ( 0 ,   0 ,   80 ));
        btnExit . setText ( "Exit" );
        btnExit . setToolTipText ( "Click to exit the program" );
        btnExit . addActionListener ( new  java . awt . event . ActionListener ()   {
             public   void  actionPerformed ( java . awt . event . ActionEvent  evt )   {
                btnExitActionPerformed ( evt );
             }
         });

        pnlTotals . setBorder ( javax . swing . BorderFactory . createTitledBorder ( null ,   "Totals (to Date)" ,  javax . swing . border . TitledBorder . DEFAULT_JUSTIFICATION ,  javax . swing . border . TitledBorder . DEFAULT_POSITION ,   new  java . awt . Font ( "Tahoma" ,   1 ,   12 ),   new  java . awt . Color ( 0 ,   0 ,   80 )));   // NOI18N
        pnlTotals . setToolTipText ( "" );

        jLabel3 . setFont ( new  java . awt . Font ( "Tahoma" ,   1 ,   12 ));   // NOI18N
        jLabel3 . setForeground ( new  java . awt . Color ( 0 ,   0 ,   80 ));
        jLabel3 . setText ( "Score:" );

        txtTotal . setFont ( new  java . awt . Font ( "Tahoma" ,   1 ,   12 ));   // NOI18N
        txtTotal . setForeground ( new  java . awt . Color ( 0 ,   0 ,   80 ));
        txtTotal . setToolTipText ( "Total points to date." );
        txtTotal . setEnabled ( false );

        jLabel4 . setFont ( new  java . awt . Font ( "Tahoma" ,   1 ,   12 ));   // NOI18N
        jLabel4 . setForeground ( new  java . awt . Color ( 0 ,   0 ,   80 ));
        jLabel4 . setText ( "%: " );

        txtPercent . setFont ( new  java . awt . Font ( "Tahoma" ,   1 ,   12 ));   // NOI18N
        txtPercent . setForeground ( new  java . awt . Color ( 0 ,   0 ,   80 ));
        txtPercent . setToolTipText ( "Total points to date." );
        txtPercent . setEnabled ( false );

        jLabel5 . setFont ( new  java . awt . Font ( "Tahoma" ,   1 ,   12 ));   // NOI18N
        jLabel5 . setForeground ( new  java . awt . Color ( 0 ,   0 ,   80 ));
        jLabel5 . setText ( "Grade:" );

        txtGrade . setFont ( new  java . awt . Font ( "Tahoma" ,   1 ,   12 ));   // NOI18N
        txtGrade . setForeground ( new  java . awt . Color ( 0 ,   0 ,   80 ));
        txtGrade . setToolTipText ( "Total points to date." );
        txtGrade . setEnabled ( false );

        javax . swing . GroupLayout  pnlTotalsLayout  =   new  javax . swing . GroupLayout ( pnlTotals );
        pnlTotals . setLayout ( pnlTotalsLayout );
        pnlTotalsLayout . setHorizontalGroup (
            pnlTotalsLayout . createParallelGroup ( javax . swing . GroupLayout . Alignment . LEADING )
             . addGroup ( pnlTotalsLayout . createSequentialGroup ()
                 . addComponent ( jLabel3 )
                 . addPreferredGap ( javax . swing . LayoutStyle . ComponentPlacement . UNRELATED )
                 . addComponent ( txtTotal ,  javax . swing . GroupLayout . PREFERRED_SIZE ,   60 ,  javax . swing . GroupLayout . PREFERRED_SIZE )
                 . addPreferredGap ( javax . swing . LayoutStyle . ComponentPlacement . RELATED )
                 . addComponent ( jLabel4 )
                 . addPreferredGap ( javax . swing . LayoutStyle . ComponentPlacement . RELATED )
                 . addComponent ( txtPercent ,  javax . swing . GroupLayout . PREFERRED_SIZE ,   60 ,  javax . swing . GroupLayout . PREFERRED_SIZE )
                 . addPreferredGap ( javax . swing . LayoutStyle . ComponentPlacement . UNRELATED )
                 . addComponent ( jLabel5 )
                 . addPreferredGap ( javax . swing . LayoutStyle . ComponentPlacement . UNRELATED )
                 . addComponent ( txtGrade ,  javax . swing . GroupLayout . PREFERRED_SIZE ,   60 ,  javax . swing . GroupLayout . PREFERRED_SIZE )
                 . addGap ( 0 ,   150 ,   Short . MAX_VALUE ))
         );
        pnlTotalsLayout . setVerticalGroup (
            pnlTotalsLayout . createParallelGroup ( javax . swing . GroupLayout . Alignment . LEADING )
             . addGroup ( pnlTotalsLayout . createSequentialGroup ()
                 . addContainerGap ()
                 . addGroup ( pnlTotalsLayout . createParallelGroup ( javax . swing . GroupLayout . Alignment . BASELINE )
                     . addComponent ( jLabel3 )
                     . addComponent ( txtTotal ,  javax . swing . GroupLayout . PREFERRED_SIZE ,  javax . swing . GroupLayout . DEFAULT_SIZE ,  javax . swing . GroupLayout . PREFERRED_SIZE )
                     . addComponent ( jLabel4 )
                     . addComponent ( txtPercent ,  javax . swing . GroupLayout . PREFERRED_SIZE ,  javax . swing . GroupLayout . DEFAULT_SIZE ,  javax . swing . GroupLayout . PREFERRED_SIZE )
                     . addComponent ( jLabel5 )
                     . addComponent ( txtGrade ,  javax . swing . GroupLayout . PREFERRED_SIZE ,  javax . swing . GroupLayout . DEFAULT_SIZE ,  javax . swing . GroupLayout . PREFERRED_SIZE ))
                 . addContainerGap ( javax . swing . GroupLayout . DEFAULT_SIZE ,   Short . MAX_VALUE ))
         );

        mnuFile . setText ( "File" );

        mnuSave . setAccelerator ( javax . swing . KeyStroke . getKeyStroke ( java . awt . event . KeyEvent . VK_S ,  java . awt . event . InputEvent . ALT_MASK ));
        mnuSave . setText ( "Save All" );
        mnuSave . setToolTipText ( "Click to Save all information" );
        mnuSave . addActionListener ( new  java . awt . event . ActionListener ()   {
             public   void  actionPerformed ( java . awt . event . ActionEvent  evt )   {
                mnuSaveActionPerformed ( evt );
             }
         });
        mnuFile . add ( mnuSave );
        mnuFile . add ( jSeparator1 );

        mnuExit . setAccelerator ( javax . swing . KeyStroke . getKeyStroke ( java . awt . event . KeyEvent . VK_X ,  java . awt . event . InputEvent . ALT_MASK ));
        mnuExit . setText ( "Exit" );
        mnuExit . setToolTipText ( "Click to exit application" );
        mnuExit . addActionListener ( new  java . awt . event . ActionListener ()   {
             public   void  actionPerformed ( java . awt . event . ActionEvent  evt )   {
                mnuExitActionPerformed ( evt );
             }
         });
        mnuFile . add ( mnuExit );

        jMenuBar1 . add ( mnuFile );

        mnuCourse . setText ( "Course" );
        jMenuBar1 . add ( mnuCourse );

        mnuAssignments . setText ( "Assignment" );
        mnuAssignments . setToolTipText ( "" );

        mnuSaveAssignment . setAccelerator ( javax . swing . KeyStroke . getKeyStroke ( java . awt . event . KeyEvent . VK_S ,  java . awt . event . InputEvent . ALT_MASK  |  java . awt . event . InputEvent . SHIFT_MASK ));
        mnuSaveAssignment . setText ( "Save" );
        mnuSaveAssignment . setToolTipText ( "Click to save the current week's assignment information" );
        mnuSaveAssignment . addActionListener ( new  java . awt . event . ActionListener ()   {
             public   void  actionPerformed ( java . awt . event . ActionEvent  evt )   {
                mnuSaveAssignmentActionPerformed ( evt );
             }
         });
        mnuAssignments . add ( mnuSaveAssignment );

        mnuClear . setAccelerator ( javax . swing . KeyStroke . getKeyStroke ( java . awt . event . KeyEvent . VK_C ,  java . awt . event . InputEvent . ALT_MASK  |  java . awt . event . InputEvent . SHIFT_MASK ));
        mnuClear . setText ( "Clear" );
        mnuClear . setToolTipText ( "Click to clear the current week's assignment information" );
        mnuClear . addActionListener ( new  java . awt . event . ActionListener ()   {
             public   void  actionPerformed ( java . awt . event . ActionEvent  evt )   {
                mnuClearActionPerformed ( evt );
             }
         });
        mnuAssignments . add ( mnuClear );

        jMenuBar1 . add ( mnuAssignments );

        setJMenuBar ( jMenuBar1 );

        javax . swing . GroupLayout  layout  =   new  javax . swing . GroupLayout ( getContentPane ());
        getContentPane (). setLayout ( layout );
        layout . setHorizontalGroup (
            layout . createParallelGroup ( javax . swing . GroupLayout . Alignment . LEADING )
             . addGroup ( layout . createSequentialGroup ()
                 . addGroup ( layout . createParallelGroup ( javax . swing . GroupLayout . Alignment . LEADING )
                     . addGroup ( layout . createSequentialGroup ()
                         . addContainerGap ()
                         . addComponent ( tbMain ))
                     . addGroup ( layout . createSequentialGroup ()
                         . addGap ( 24 ,   24 ,   24 )
                         . addGroup ( layout . createParallelGroup ( javax . swing . GroupLayout . Alignment . LEADING )
                             . addComponent ( jLabel1 )
                             . addComponent ( jLabel2 ))
                         . addGap ( 0 ,   0 ,   Short . MAX_VALUE )))
                 . addContainerGap ())
             . addGroup ( javax . swing . GroupLayout . Alignment . TRAILING ,  layout . createSequentialGroup ()
                 . addContainerGap ()
                 . addComponent ( pnlTotals ,  javax . swing . GroupLayout . PREFERRED_SIZE ,  javax . swing . GroupLayout . DEFAULT_SIZE ,  javax . swing . GroupLayout . PREFERRED_SIZE )
                 . addPreferredGap ( javax . swing . LayoutStyle . ComponentPlacement . RELATED )
                 . addComponent ( btnSave ,  javax . swing . GroupLayout . PREFERRED_SIZE ,   90 ,  javax . swing . GroupLayout . PREFERRED_SIZE )
                 . addPreferredGap ( javax . swing . LayoutStyle . ComponentPlacement . UNRELATED )
                 . addComponent ( btnExit ,  javax . swing . GroupLayout . PREFERRED_SIZE ,   85 ,  javax . swing . GroupLayout . PREFERRED_SIZE )
                 . addContainerGap ( 30 ,   Short . MAX_VALUE ))
         );
        layout . setVerticalGroup (
            layout . createParallelGroup ( javax . swing . GroupLayout . Alignment . LEADING )
             . addGroup ( layout . createSequentialGroup ()
                 . addContainerGap ()
                 . addComponent ( jLabel1 )
                 . addPreferredGap ( javax . swing . LayoutStyle . ComponentPlacement . RELATED )
                 . addComponent ( jLabel2 )
                 . addGap ( 11 ,   11 ,   11 )
                 . addComponent ( tbMain ,  javax . swing . GroupLayout . PREFERRED_SIZE ,   504 ,  javax . swing . GroupLayout . PREFERRED_SIZE )
                 . addGap ( 18 ,   18 ,   18 )
                 . addGroup ( layout . createParallelGroup ( javax . swing . GroupLayout . Alignment . LEADING )
                     . addGroup ( javax . swing . GroupLayout . Alignment . TRAILING ,  layout . createParallelGroup ( javax . swing . GroupLayout . Alignment . BASELINE )
                         . addComponent ( btnSave )
                         . addComponent ( btnExit ))
                     . addComponent ( pnlTotals ,  javax . swing . GroupLayout . Alignment . TRAILING ,  javax . swing . GroupLayout . PREFERRED_SIZE ,  javax . swing . GroupLayout . DEFAULT_SIZE ,  javax . swing . GroupLayout . PREFERRED_SIZE ))
                 . addContainerGap ( javax . swing . GroupLayout . DEFAULT_SIZE ,   Short . MAX_VALUE ))
         );

        pack ();
     } // </editor-fold>//GEN-END:initComponents

     //TODO:  in the following event handlers, invoke the appropriate method
     //defined in this class.  
     //I recommend that you ensure all the method TODO's are completed
     //before you set the event handlers
     private   void  btnExitActionPerformed ( java . awt . event . ActionEvent  evt )   { //GEN-FIRST:event_btnExitActionPerformed
        
     } //GEN-LAST:event_btnExitActionPerformed

     private   void  btnSaveActionPerformed ( java . awt . event . ActionEvent  evt )   { //GEN-FIRST:event_btnSaveActionPerformed
       
     } //GEN-LAST:event_btnSaveActionPerformed

     private   void  mnuSaveActionPerformed ( java . awt . event . ActionEvent  evt )   { //GEN-FIRST:event_mnuSaveActionPerformed
       
     } //GEN-LAST:event_mnuSaveActionPerformed

     private   void  mnuExitActionPerformed ( java . awt . event . ActionEvent  evt )   { //GEN-FIRST:event_mnuExitActionPerformed
        
     } //GEN-LAST:event_mnuExitActionPerformed

     private   void  mnuSaveAssignmentActionPerformed ( java . awt . event . ActionEvent  evt )   { //GEN-FIRST:event_mnuSaveAssignmentActionPerformed
        
     } //GEN-LAST:event_mnuSaveAssignmentActionPerformed

     private   void  mnuClearActionPerformed ( java . awt . event . ActionEvent  evt )   { //GEN-FIRST:event_mnuClearActionPerformed
         
     } //GEN-LAST:event_mnuClearActionPerformed

     private   void  tbMainStateChanged ( javax . swing . event . ChangeEvent  evt )   { //GEN-FIRST:event_tbMainStateChanged
        
     } //GEN-LAST:event_tbMainStateChanged

     /**
     *  @param  args the command line arguments
     */
     public   static   void  main ( String  args [])   {
         /* Set the Nimbus look and feel */
         //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
         /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
         */
         try   {
             for   ( javax . swing . UIManager . LookAndFeelInfo  info  :  javax . swing . UIManager . getInstalledLookAndFeels ())   {
                 if   ( "Nimbus" . equals ( info . getName ()))   {
                    javax . swing . UIManager . setLookAndFeel ( info . getClassName ());
                     break ;
                 }
             }
         }   catch   ( ClassNotFoundException  ex )   {
            java . util . logging . Logger . getLogger ( Scores_Main . class . getName ()). log ( java . util . logging . Level . SEVERE ,   null ,  ex );
         }   catch   ( InstantiationException  ex )   {
            java . util . logging . Logger . getLogger ( Scores_Main . class . getName ()). log ( java . util . logging . Level . SEVERE ,   null ,  ex );
         }   catch   ( IllegalAccessException  ex )   {
            java . util . logging . Logger . getLogger ( Scores_Main . class . getName ()). log ( java . util . logging . Level . SEVERE ,   null ,  ex );
         }   catch   ( javax . swing . UnsupportedLookAndFeelException  ex )   {
            java . util . logging . Logger . getLogger ( Scores_Main . class . getName ()). log ( java . util . logging . Level . SEVERE ,   null ,  ex );
         }
         //</editor-fold>

         /* Create and display the form */
        java . awt . EventQueue . invokeLater ( new   Runnable ()   {
             public   void  run ()   {
                 new   Scores_Main (). setVisible ( true );
             }
         });
     }

     // Variables declaration - do not modify//GEN-BEGIN:variables
     private  javax . swing . JButton  btnExit ;
     private  javax . swing . JButton  btnSave ;
     private  javax . swing . JLabel  jLabel1 ;
     private  javax . swing . JLabel  jLabel2 ;
     private  javax . swing . JLabel  jLabel3 ;
     private  javax . swing . JLabel  jLabel4 ;
     private  javax . swing . JLabel  jLabel5 ;
     private  javax . swing . JMenuBar  jMenuBar1 ;
     private  javax . swing . JScrollPane  jScrollPane1 ;
     private  javax . swing . JPopupMenu . Separator  jSeparator1 ;
     private  javax . swing . JTextArea  jTextArea1 ;
     private  javax . swing . JMenu  mnuAssignments ;
     private  javax . swing . JMenuItem  mnuClear ;
     private  javax . swing . JMenu  mnuCourse ;
     private  javax . swing . JMenuItem  mnuExit ;
     private  javax . swing . JMenu  mnuFile ;
     private  javax . swing . JMenuItem  mnuSave ;
     private  javax . swing . JMenuItem  mnuSaveAssignment ;
     private  javax . swing . JPanel  pnlTotals ;
     private  javax . swing . JTabbedPane  tbMain ;
     private  javax . swing . JTextField  txtGrade ;
     private  javax . swing . JTextField  txtPercent ;
     private  javax . swing . JTextField  txtTotal ;
     // End of variables declaration//GEN-END:variables
}

__MACOSX/assignment/source code/src/presentation/._Scores_Main.java

__MACOSX/assignment/source code/src/._presentation

__MACOSX/assignment/source code/._src