Student club Management System

infestationwatchΛογισμικό & κατασκευή λογ/κού

28 Οκτ 2013 (πριν από 3 χρόνια και 5 μήνες)

77 εμφανίσεις

UIC 2009
Final Year Project (Thesis)






Student club
Management System


Major

Computer

science


S
tuden
t name

Yaokai

Project: Final year project


Teacher

Pro.Guo


Abstract

This System use

JSP MODEL2 MVC (MODEL+VIEW+CONTROL) of J2EE, use
Eclipse3.1.8+Tomcat5.0+JDK5.0+MSSQL
-
this
Develops

platform to develop and test. B/S

construction, use
software engineering thought in system design and implementation, according to Waterfall Model to write design
document completely. Design software which used flow chart, UML chart and so on, this can ma
ke logic error
little. Use the tool of PowerDesigner to design database, use the tool of JUnit to write test case, do cell test and
integration test. On interface, use the technology of Ajax
and put data to

XML

file, and complete difficult
operation flow.
Designed auto make curriculum schedule. It can complete special requirement. Gentler
delamination design, beautiful page design, lowness coupling in fuctions

, optimize of SQL and arithmetic
sentence make this system very well.


Keywords

j2EE
,
MODEL2
,
MVC
,
Ajax
,
auto do
curriculum schedule
,
B/S











UIC 2009

Final Year

Project (Thesis)




2

1

Introduction


S
tudent club Management System

is a school system which
provide electronic solutions

for the student in club

Committed to build the field of e
-
uniform, standardized, compr
ehensive
technology platform services

In the electronic integration of teaching the concept of human
resource management, basic on people
-
oriented, it has teaching management, test management,
automated timetable, performance information, that can support

implementing the teaching of the
overall process

Teaching in the electronic network technology will be combination of traditional
teaching. Build a environment for school to provide distance education technology solutions,
high
-
quality education services
will be extended to every corner of society

It is the system object
that in order to achieve the needs of e
-
development
.
System development in the use of the

Eclipse

tomcat

DK

development tools and runtime environment

Ajax

Web Model2 (MVC)

Design pattern

j
stl
.


2

P
repare

For

System Development


2.1

What

s
Eclipse

Eclipse

is a multi
-
language
software development platform

comprising an
IDE

and a
plug
-
in

system to extend it. It is written
primaril
y in
Java

and is used to develop applications in this language
and, by means of the various plug
-
ins, in other
languages

as well
-

C
,
C++
,
COBOL
,
Python
,
Perl
,
PHP

and
more. The

initial
codebase

originated
from
VisualAge
.
In its default

form it is meant for Java developers,
consisting of the Java Development Tools (JDT). Users can extend its
capabilities by installing plug
-
ins written for the Eclipse software
framework, such as development toolkits for other programming languages,
and ca
n write and contribute their own plug
-
in modules. Language packs
provide translations into over a dozen
natural languages

2.2

What

s JDK

&
Js
p &
Servlet

What

s JDK:

The
Java De
velopment Kit

(
JDK
) is a
Sun Microsystems

product aimed at
Java

de
velopers.
Since the introduction of Java, it has been by far the most widely used Java
SDK
. On
17
November

2006
, Sun announced that it would be released under the
GNU General
Public License

(GPL), thus making it
free software
. This happened in large part on
8 May

2007
[1]

and the source
code was contributed to the
OpenJDK

UIC 2009

Final Year

Project (Thesis)




3

W
hat

s JSP
:

J
ava Server Pages

(
JSP
) is a
Java

technology that allows
softwar
e
developers

to create
dynamically
-
generated web sites
, with
HTML
,
XML
,
or other document types, in response to a
Web client

request. The
technology allows Java code and certain pre
-
defined actions to be
embedded into static content. The

JSP syntax adds additional
XML
-
like
tags, called JSP actions, to be used to invoke built
-
in functionality.
Additionally, the technology allows for the creation of JSP tag libraries
that act as exte
nsions to the standard HTML or XML tags. Tag libraries
provide a
platform independent

way of extending the capabilities of a
Web server
.JSPs are compiled into
Java Servlets

by a
JSP compiler
. A JS
P
compiler may generate a servlet in Java code that is then compiled by
the Java compiler, or it may generate
byte code

for the servlet directly.
JSPs can also be
interpreted

on
-
the
-
fly, reducing the time taken to reload
changes.

2.3


What

s
Tomcat
:

Apache Tomcat

is a
servlet container

d
eveloped by the
Apache
Software Foundation

(ASF). Tomcat implements the
Java
Servlet

and the
JavaServer Pages

(JSP) specifications from
Sun Microsystems
, and
provid
es a "pure
Java
"
HTTP

web server

environment for
Java

code to run.

Tomcat should not be confused with the
Apache web server
, which is a
C

implementation of an HTTP web server; these two web se
rvers are not
bundled together. Apache Tomcat includes tools for configuration and
management, but can also be configured by editing
XML

configuration
files.

2.4


W
hat

s
Ajax
:

Ajax
, sometimes written as

AJAX

(shorthand for
asynchronous

JavaScript

and
XML
), is a
group of interrelated
web development

techniques used on the
client
-
side

to create

interactive
web
applications

or
rich Internet applications
. With Ajax,
web applications

can retrieve data from the
server

asynchronously in the background without interferin
g with the display and behavior of the
existing page. The use of Ajax has led to an increase in interactive animation on web pages and
better quality of Web services thanks to the asynchronous mode. Data is retrieved using the
XMLHttpRequest

object
. Despite the name, the use of
JavaScript

and
XML

is not actually
UIC 2009

Final Year

Project (Thesis)




4

required, nor do the requests need to be
asynchronous

2.5

W
hat

s
MVC

&
Mod
el2
:

Model

view

controller

(MVC) is an
architectural pattern

used
in
software engineering
. Successful use of the pattern isolates
business
logic

from
user interface

considerations, resulting in an application
where it is easier to modify either the visual appearance of the
application or the underlying business rules without affecting the other.
In MVC, the
model

represents the inf
ormation (the data) of the application;
the
view

corresponds to elements of the user interface such as text,
checkbox items, and so forth; and the
controller

manages the
communication of data and the business rules used to manipulate the data
to and from t
he model.

Model 2
uses the
Model
-
View
-
Controller

(MVC)
design pattern

to
separate
presentation

from
content
.In a Model 2 application, requests
from
the
client

browser

are passed to the
controller
, which is a
servlet
.
The controller decides which view (
JSP
) it will pass
the request to. The
view then invokes methods in a
JavaBean

(which may access a database)
and returns the Response object to the
Web container
, which is then passed
on to the client browser.


UIC 2009

Final Year

Project (Thesis)




5


2.6

What’s

jstl


The Java Server Pages Standard Tag Library (JSTL) encapsulates, as
simple tags, core functionality common to many JSP applications. For
example, instead

of suggesting that you iterate over lists using a
scriptlet or different iteration tags from numerous vendors, JSTL defines
a standard tag that works the same everywhere. This standardization lets
you learn a single tag and use it on multiple JSP containe
rs. Also, when
tags are standard, containers can recognize them and optimize their
implementations. JSTL has support for common, structural tasks such as
iteration and conditionals, tags for manipulating XML documents,
internationalization and locale
-
sensi
tive formatting tags, and SQL tags.
It also introduces a new expression language to simplify page development,
and it provides an API for developers to simplify the configuration of
JSTL tags and the development of custom tags that conform to JSTL
conventi
ons

UIC 2009

Final Year

Project (Thesis)




6


2.7

Product Description
:

The system is designed with J2EE the B / S structure for the UIC web system administrators,
teachers and students in the development of WEB version of the online management platform.

In
order to reduce the large number of them to
repeat the tedious work. Students and teachers have
more time to focus on learning and work.

System is divided into five modules
:
the permissions
module, teaching modules, student module, the teacher module, test module. Each module is
divi
ded into several

sub
-
features,
make the

smaller degree of coupling between modules


This
system develop aim is to replace the paper work of English club activities.
It will
develop

under UIC ELC website to let staff and student to login by their user
ID and password.


The
re are 7 main functions provided by the system:

1.

Staff can v
iew

and edit

students information

2.

Edit club activity timetable

3.

Taking student club attendance

4.

Staff

can view the attendance list

5.

Student writ
ing

report

and send
to TA

automatically

6.

Staff

can receiv
e

report

from system and mark the report

7.

Send the mark list to English teacher

in English class list order

and

to
students’

individual

by Email.


2.8

Product Feature List

List

1

Product Feature List

number

name

compendium

1

Parts of the
web


UIC 2009

Final Year

Project (Thesis)




7

1.1

Login


Entrance system, to select the
admin

(students, teachers, administrators)

1.2

Students

Curriculum

Students can see their class schedule

1.3

Student Information

Can modify thei
r basic information

1.4

Examination

Students can choose courses, and then
take the exam

1.5

Student achievement

Students can
get the
course examination
results

1.6

Teacher curriculum

Teachers can see their own teaching
curriculum

1.7

Teacher informati
on

Can modify their basic information

1.8

Timetable
information

Class time to arrange
the

administrator

2

background


2.1

User
management


System administrator access to all parts of
the whole system of authority to carry out
the distribution of functio
ns, modify, and
delete operat ions; system administrator
can add other administrator (administrator
of teaching; BBS administrator; librarian)

2.2

Teaching Manager


Including add, change, delete students,
teachers, courses and classes; Timetable
to ensure
that the same teachers at the
same time can not be on two courses

2.3

Student Module

Student curriculum, student achievement

2.4

Teacher

Module

Teacher curriculum

2.6

Test module


Selected from a database of examinat ions
required for the subject; studen
ts can be
finished automatically score





UIC 2009

Final Year

Project (Thesis)




8

2.9

Functional Requirements for Products

2.9.1

<

Student Module

>

After landing the students can choose courses reported. System where the student grades and
postgraduate courses in pre
-
judgment

1.

The system will list all t
he student has not elected to meet at the course, or its
pre
-
taught courses for the public classes. If the student reported the election did not
meet the requirements of pre
-
taught courses, the system will be error
-
related.

2.

Students can view their own ach
ievements, including the student has selected the
names of courses, credits, and total scores of the students. If teachers have not given
results, the system will be related tips.

3.

Student curriculum, time, location, course name, teacher name, if the teache
rs have no
choice at this time students course curriculum inquiry, teachers were allowed to be
empty


2.9.2

<

Teacher Module

>

Teachers in the system whether or not to accept the students have selected courses, and points
to the students the power to accept stud
ents only in order to give the student grades..


1.

The system requirements for teachers to select students, and then the system will list
the courses on behalf of teachers, classes, and then the system will report sets out the
curriculum for all students; c
an see some of the details of students


2.

A total score of the examination
:

f inal
× 80% +
min
× 20%; test scores by
students after the test f inished automatic scoring system, teachers are given
normal results; usually results accounted for the percentage of o
ld results given
by the teacher.


3.

Peacetime achievement test scores and the scores of the scope of 0
-
100, teacher
curriculum, time, location, course name, class name

UIC 2009

Final Year

Project (Thesis)




9

2.9.3

<

Manager
Module

>

1.

The administrator in this module has the highest powers, including the
add, change,
delete students, teachers, courses and classes.


2.

The administrator in charge of arranging schedule, to ensure that the same teachers at
the same time and so can not be bound by the two courses.

2.9.4

<

Test module

>

1.

From the database randomly select
ed subjects require
d for professional examinations

2.

Students finished
and
automatically score.

2.9.5


<

Competence module

>

1.

All web pages need to verify that the page permissions, the distribution
of the different modules of different access.

2.

All web pages need t
o verify that the page permissions, the distribution
of the different modules of different access.

3.

System administrator user name and password can be set in advance in the
database.

2.10

The user interface requirement

L
ist
2:

N
eeds of the user interface

NAME

D
etail requirement

Interface Style

Unified interface style;
Don

t

need be very dizzy page design,

achieve the functions first

2.11

Requirement
for hardware and software environment

L
ist
3:

Requirement for hardware and sof
tware environment

list

NAME

D
etail requirement

Server
-
side
hardware

CPU: P4 2.4 or above; DDR1G

more than memory; hard drive
10
G
~300G

or more

UIC 2009

Final Year

Project (Thesis)




10

Client
hardware

P

, Celeron, and the model processor; memory: 32M or more; hard drive more than
2G

Server
-
side

software

Operating system to install Windows 2000 server Oracle 9i, Tomcat5.0 or above.

Client
software

Operating system to install windows98 or above, IE browser 5.5 or above required


2.12

Summary of design

Summary of the design of the project is mainly cl
assif ication and analysis of the relat ionship
between the various interfaces to allow various modules to work together better.

2.13

The
main
design structure



The main design structur
e





Login Module


Student Module

Teacher Module

Manager Module

Per Information

Results

T
est module

Schedule

M
in_
exam

Final
_exam


Ele
ct

club

Per Information


Marking




Schedule




Teaching

Text

Syst em

UIC 2009

Final Year

Project (Thesis)




11


2.14

Documentation
direct

2.14.1

M

MODEL

C
om.sevenEleven.Beans
:
The main database contains the persistent class

Com.sevenEleven.javaBean
:
Package and sub
-
package contains the database
connectivity layer type, as well as business class. This layer as a model layer

2.14.2

V:VIEW

WebContent
Folde
r
: C
ontains pages and page elements. There are JSP, HTML, CSS,
FLASH, JS and so on. View as a project level

2.14.3

C:CONTROL

C
om.sevenEleven.servlet
:
Package and sub
-
package contains a servlet in WEB document,
as a control layer. MODEL and the VIEW layer cont
rol layer of the data flow between

UIC 2009

Final Year

Project (Thesis)




12

2.15

Database Design

2.16

Description
:

Database design
in order to

comply with the principles of relationship
-
oriented to ensure that
the table does not appear between the logical error at the same time, it is necessary to access a
s
possible to meet the simple paradigm of the three paradigms and two between the best
-
check to
ensure that the development and maintenance of simple readability and databases


2.17

Design by Power

Designe
:







UIC 2009

Final Year

Project (Thesis)




13

2.17.1

Database t
able

2.18

users list

Data

Type

length

Explanation

U
ser_id

char

20

ID of the user

U
ser_password

char

20

6<
P
assword<10

U
ser_type

int

4

1 is student

2 is teacher

3 is management


2.19

Student information list

Data

Type

length


S
tu_id

char

10


S
tu_name

char

10


E
nrollment_time

datetime

8


Department

char

20


Major

char

20


Sex

int

4


Birthday

datetime

8


Hometown

varchar

50


Address

varchar

50


UIC 2009

Final Year

Project (Thesis)




14

Phone

char

20


Race

char

10


Party

int

4


Direction

varchar

50






2.20

Teacher information list

Data

Type

leng
th


Tea_id

char

10


Tea_name

char

20


Title

int

4


Department

char

20


Major

char

20


Sex

int

4


Birthday

datetime

8


Hometown

varchar

50


Address

varchar

50


Phone

char

20


Race

char

10


Party

int

4


Direction

varchar

50


UIC 2009

Final Year

Project (Thesis)




15



2.21
Course inform
ation list

Data

Type

length


Course_id

char

10


Course_name

char

10


Course_time

char

4


Start_date

datetime

8


End_date

datetime

8


Cent

int

4


Course_teacher

char

10


Require

varchar

50


instuction

varchar

50



2.22

Course_score list

Data

Type

lengt
h


Stu
_id

char

10


Course_id

char

10


Course_name

char

10


Score

int

4




UIC 2009

Final Year

Project (Thesis)




16


6.

Diary information

list

Data

Type

length


Man
ager

char

10


Do_date

datetime

8


Do_what

varchar

50





2.23

<

Document sharing
>

2.23.1

Model

layer





Shared documents

Model




UIC 2009

Final Year

Project (Thesis)




17

L
ist
22

Com.sevenEleven.Beans

Package shared file
list

name

C
om.sevenEleven.Beans

C
lass name

Functional Description

CadminBean.java

System administrator Bean, as the database information on the server of
the persistent class

CchooseTestBean.java

Multiple
-
choice questions Bean, as the database information on the server
of the persistent class

CclassBean.java

Class Bean, as the database information on the server of the
persistent class

Clesson1Bean.java

Compulsory Bean, as the database information on the
server of
the persistent class

Clesson2Bean.java

Elective Bean, as the database information on the server of the
persistent class

CstudentBean.java

Students Bean, as the database information on the server of the
persistent class

CteacherBean.java

Teache
rs Bean, as the database information on the server of the
persistent class

CtextTestBean.java

Fill in the blank Bean, as the database information on the server
of the persistent class

supplementary

Package contains a database of all persistent classes f
or each module layer
called MODEL. The corresponding attribute type in the database field.
Contains the necessary class set(), get() method.



L
ist
23

Com.sevenEleven.javaBean

Package shared file list

name

C
om.sevenEleven.javaBean

Class name

Functional Description

CcheckUser.java

User Login Authentication

UIC 2009

Final Year

Project (Thesis)




18

CDBConnection.java

Base class to connect database

CConnectMSSQL.java

MSSQL database connectio
n entity class

CDBOracle.java

Oracle database
c
onnect
ion

entity class

CdataFomat.java

Different types of character set conversion

unicode ,GB


Count.java

Previous category of log
in

user counter

Page.java

C
ategory page

CseparateTime
.java

The achievemen
t of certain rules to the string that time period
broken down into specific categories


2.23.2

View

layer


the document sharing

veiw

layer document




list
24


WebContent

Folder list

F
older name

WebContent

File

name


Functional Description

E
rr.jsp

Error displ
ay page, the error message passed to this page

E
rror500.jsp

Error display page, the error message passed to this page

UIC 2009

Final Year

Project (Thesis)




19

index.jsp

Page, the nested page login.jsp

login.java

Login page, nested in the index.jsp page

T
op.jsp

The first page, nested in each s
ub
-
module main page

2.23.3

Control

layer


Control of the shared document layer paper


L
ist
25

com.sevenEleven.servlet

Shared package

servlet list

Name

com.sevenEleven.servlet

class name

Functional Description

CcheckUserServlet.java

Validate the user login

ClogoutServlet.java

Users to write
-
off

LoginFilter.java

Sign of the filter, filter ille
gal Login

OnlineCounterListener.java

Monitor the number of online

TraceFilter.java

Unicode characters in the GB2312 character to filter

UIC 2009

Final Year

Project (Thesis)




20

2.24

MVC




MVC design pattern in JAVA WEB projects reflected in the JSP (VIEW layer), Servlet

(Control layer), JavaBean (Model layer). In order to illustrate the MVC in the project
embodied in the code, you can use the registry as an example to illustrate the module.

WebContent / login.jsp as the VIEW layer is the user login page. The page display
ed
in the browser, the user can type in the location specif ied user name and password, and
select the type of users, to point to determine CcheckServlet;

com.sevenEleven.servlet.CcheckUserServlet as the Control Layer is the log function
controller, respons
ible for the control of MODEL and the VIEW layer layer data flow.
Through request.getParameter ( "USERNAME") statement to be the future of the data
input, through business processes, and then through request.getRequestDispatcher
( "teacher / teacher.jsp").

Forward (request, response); such a statement jump to therch /
teacher.jsp such a JSP page.

com.sevenEleven.javaBean. CConnectMSSQL as the Model layer,
provides a SQLServer database connection and return recordset. Call for Control Layer.


browser



DataBase

JSP

servlet

JavaBe
an

View

Model

request

response

Control

UIC 2009

Final Year

Project (Thesis)




21

2.25

Analysis and Des
ign page

2.25.1

Analysis and Design page
:

Reference

the
online
page of analysis, number of pages used in three ways: (according to
data classification)


1

The one
-
time data to be removed from the database, this method just hours for the
amount of data, but is not recommended.



advantages: first removed the entire data in the cache, the Jump to other page when
extremely fast



Disadvantages: Remove all the dat
a the first time, on the cache, the extreme waste of
resources.


2

Only need to check the current page of data. Suit
the
large volume data.



advantages: only need to take out each page of data, greatly reducing the amount of data
cache.



Disadvantages: Jum
p at every page to be connected database, created a pressure on the
database.


3

A few pages out of each data points in the cache when the cache does not need the
data for each page, then check from the data. More suit
the
large data.

2.25.2

P
age design

From th
e above analysis, I selected the first two kinds of methods to achieve.


1

How to get the data from database



To achieve the second kind of methods, then the data is dynamic. In other words every time
the data determine from the current page is the
first number of data access. SQL statement is very
important, to give two parameters.


2

How to
category page



Page category, the main function of the current page

s

data
.

The main page is returned
to a control
.
This control is achieved by a functi
on

pa
rameters are submitted


servlet


return
html

page, th
is

is

the

page

control

code
.


UIC 2009

Final Year

Project (Thesis)




22

3

servlet

realization



servlet1:
Initialization to generate the page
.


servlet2:
N
on
-
initialization of
generate
the page
.


4

jsp

increase



S
ervlet

add a

get fontion
(String),

through the
request.setA
ttribute
()

i
ndicates

onto the
page

that every

J
sp

need to add:

<!
--

Page controls

--
>



${choose1PageStr}


<tr>



<td><input type="hidden" name="choose1Page" value="${choose1Page}"
/>
</td>



</tr>


2.26

T
ime string

Used class time is not absolute time. Because the year does not work in the project, and the
first few semesters, the first few weeks, a few weeks, the first few classes but the time factor in
the Timetable. Of course,

the relative time and classes from the class time, using a fixed formula
can be an absolute time. Here we use the time string can not only reduce the redundant
information storage database, and allow time for the background of a relatively simple operatio
n.


2.27

Competence analysis and design

There are a variety of permissions problem solutions, such as the Windows System
user groups. In order to reduce the workload and complexity, there are no permissions to
each user ID and user group settings. As an indepen
dent page, where the use of
permissions and registry permissions page
.

UIC 2009

Final Year

Project (Thesis)




23



Page Permissions
:
JSP can filter (Filter) to achieve


Sign permissi
ons:
JAVA code can be achieved


Such different types of users log on to different pages, and other types of users ca
n not
access the user's page
.

3

S
ummarizes

Through the
FYP
, the textbooks should be secondary to the programming and project
management knowledge for practice. A better understanding
of how
enhance the
programming and the cognitive functions of the program t
o an independent ability to
complete simple projects.
FYP

design of the most profound insights are summarized


1.

The standardization of programming for

the

project design and maintenance of
the latter are very important, especially for large
-
scale project te
ams to develop,
the importance of more prominent

2.

In the project design to the detailed function of each interface, the Notes to be
very detailed, and enhance code readability

3.

The project is very important in the project framework, a good framework for the
process are not only easy to read, reducing the workload, but also can reduce
maintenance and modification

4.

When the two programs do not know how to make a choice, the choice of their
own programs or simple. Do not miss the work arrangements. Program design

and implementation of written documents, when to change, serious change
carefully written document

5.

In the modular design, it is necessary to give full consideration to the other
modules and the links between modules to minimize the coupling between mode

6.

I
n the design of database design in the right relationship between the various
tables, we should try to let the database to find and simple to operate






UIC 2009

Final Year

Project (Thesis)




24

literature cite
:

[1]

Robert A. Maksimchuk Eric J. Naibury UML
初学者指南

人民邮电出版社

[2]
姜江

Power Designer
数据库系统分析设计与应用

电子工业出版社

[3
]
莫勇腾

深入浅出设计模式(
Java
版)

清华大学出版社

[4
]
UML for Java Programmers
英文版(电子版)

[5
]
Vivck Chopra Jon Eares Rupert Jones
JSP
程序设计

人民邮电出版社

[6
]
Michael J. Hernandez
数据库设计凡人入门
-
关系数据库设计指南(第二版)

电子工业出版社

[7
]
Thinking in Java
中文版(电子版)

[8
]
Eclipse
从入门到
精通(电子版)

[9
]


MVC

JavaWeb
设计与开发(电子版)