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
)