The following resources come from the 2009/10 B.Sc in Media Technology and Digital Broadcast (course number 2ELE0076) from the University of Hertfordshire. All the mini projects are designed as level two modules of the undergraduate programmes.
2. Mini Project- ITC Internet Security
Section 1. Project Introduction
1. Learning Outcomes assessed (as taken from the DMD)
All Learning Outcomes specified in the Definitive Module Documentation are assessed as part of this miniproject, the
specific Learning Outcomes are:
Knowledge and Understanding
• Be able to analyse and breakdown problem tasks into manageable steps.
• Integrate previous and concurrent learning and to use it to solve technology-based problems.
• Be able to describe the project life-cycle appropriately.
• Be able to select appropriate Internet Technology and E-Commerce and techniques for a given situation.
Skills and Attributes
• Produce a solution to a defined Internet Technology and E-Commerce Technology problem.
• Carry out a simple critical evaluation of their solution.
• Demonstrate an ability to work effectively in a team, small groups and individually.
• Demonstrate an ability to manage time and resources effectively.
2. Project Title: Internet Security Mechanisms
3. Project Objectives: (technical, specific to this project)
To develop and program a Finger Print Reader as part of a security system, and understand related issues to achieve
a simple yet secure identification process:
• Understanding the Java API of a commercial Finger Print Reader
• Modification of existing Java source code in the "BlueJ" Integrated Development Environment.
• Communicating with Windows and a database to achieve runtime interactivity with the Reader.
4. Project Summary: (50 words max)
This project requires an understanding of a medium complexity Java API. The student will be expected to develop code
that will automatically show the corresponding photograph of an individual. The project provides students with an
awareness of developing commercial Java software within the Windows OS environment.
5. Introductory Lecture (2hrs) Content:
• Introduction to the commercial software package "GrFinger" and its object oriented hierarchy.
• Use of BlueJ to manage and develop the package.
• Review of applicable Java coding techniques to achieve the functional objectives.
• Product Testing plans and techniques.
• Technical standards of developing code for maintenance and ease of use.
6. Preparation Session (3hrs):
I. An introduction to GrFinger and the associated "Hsqldb" commercial database.
II. Code walking to demonstrate the detailed operation of the GrFinger API.
7. Day 1
Expected Outcomes for the day:
Students working individually must modify the commercial GrFinger package to allow its use within the BlueJ
environment. Photograph and suitably embed and store images of 3 different fellow students each for subsequent recall
using the commercial Java database Hsqldb. Develop a written software test plan.
Page 2 of 8
3. Mini Project- ITC Internet Security
Assessment criteria; the way in which the work has been planned and managed, the capturing and embedding and
naming of images working in small groups and the way in which they are stored to allow direct database access through
the GrFinger API and the Windows OS.
Key Tasks:
• Project Planning; developing an appropriate strategy to meet a specific set of technical requirements.
• Content capture, working in small groups, using a limited number of cameras and store within an appropriate
Windows file structure.
• Manipulation of the BlueJ IDE library classes and Java code to allow GrFinger to run successfully.
• Technical appraisal assessing how the program actually runs using the BlueJ development tools.
• Delivery of an individually written software test plan.
8. Day 2
Expected Outcomes for the day:
To modify existing Java code that will allow a photograph of the fingerprint owner to be automatically displayed
immediately the fingerprint is successfully read by the FingerPrint Reader. To assess how robust the software is by using
the test plan written during Day 1.
Assessment criteria; the way in which the work has been managed, the functionality of the system and how well it meets
the specified requirements and how robust the system proves to be using the test plan.
Key Tasks:
• Project Planning; developing an appropriate strategy to meet a specific set of technical requirements.
• Achieve full functionality of the system.
• Demonstration of code robustness.
• Technical Appraisal; Best practises of code writing and demonstration of ease of maintenance.
9. Facilitator guidance (key ideas to draw out from students):
Day 1: IDE configuration requirements, file structure and GrFinger/Hsqldb package structures.
Day 2: Code development and best practises.
10. Required Resources: Laboratory Facilities and Teaching Support.
Laboratory Resources: D401/405 or equivalent.
1. PC Workstations with the Microsoft fingerprint reader + FingerCap USB Driver + BlueJ installed.
2. Access to a few still or video cameras to allow capture of specific content.
Teaching Resources:
3. Preparatory Session; access to the GrFinger and the Hsqldb database documentation.
4. Day 1; briefing pack containing instructions for the day with source code materials.
5. Day 2; briefing pack for the day; additional source code materials.
Page 3 of 8
4. Mini Project- ITC Internet Security
Section 2. Class Structure
Class: Util
These 3 classes form the whole The Main Class
Drives all the
Class: components of the
FormMain system
Class:
FormOptions
Class:
ColorPane
Database
Package
grfingerjava.jar package
The proprietary licensed fingerprint engine from hsqldb.jar
Griaule.com
9 x classes total
Image
Buffered Image
Matching Context
Template
Interface
Event Listeners ...
Windows OS
USB Driver "FingerCap"
Fingerp
rint
Reader
Page 4 of 8
5. Mini Project- ITC Internet Security
Section 3. Tasks for Project Day 1
• To modify the GRFinger sample code to run in the BlueJ environment ...
• To write a simple piece of code that will write the numerical value of the fingerprint data into
the GUI textbox when a fingerprint is verified.
Project Day 1 Notes
BlueJ working with other files
BlueJ like all Integrated Development Environments (IDE's) has to be told exactly where to find extra
files that are needed to run an application. It knows where the source files are because when a
project is created you explicitly tell it which files to open. i.e. which folder (directory) they are in.
However when other files are needed you also have to tell it exactly where to find them.
The BlueJ terminal window
Will be very helpful in developing your code when it has run and then had an error since it will display
how far the code got before the error(s) occurred. Useful comments are embedded in the source
code and will be displayed as each method is running.
Printing the "" character
This back slash is a very special escape character in Java and any character following is interpreted
by the Java compiler as another special character called a control character. Unfortunately Windows
uses it to control its directory structure. So to print a back slash you have to write two "" just print a
single back slash!
Page 5 of 8
6. Mini Project- ITC Internet Security
Section 4. Tasks for Project Day 2
• To video three friends and have their movies fully automatically run as soon as the fingerprint
reader is touched by the individual.
• To open a Word document with their name written on it in large letters as soon as a friend
touches the fingerprint reader.
Project Day 2 Notes
try / catch
The try/catch statement encloses some code and must be used to handle errors and exceptions that
might occur in that code especially when trying to access files, through an operating system like
Windows, that may be in the wrong directory and cannot be found where they are expected to be.
Here is the general syntax of the try/catch statement:
try {
body-code
} catch (exception-classname variable-name) {
handler-code
}
The try/catch statement has four parts. The body-code contains code that might throw the exception
that we want to handle. The exception-classname is the class name of the exception we want to
handle. The variable-name specifies a name for a variable that will hold the exception object if the
exception occurs. Finally, the handler-code contains the code to execute if the exception occurs. After
the handler-code executes, execution of the thread continues after the try/catch statement. Here is an
example of code that tries to create a file in a non-existent directory which results in an IOException.
String filename = "/nosuchdir/myfilename";
try {
// Create the file
new File(filename).createNewFile();
} catch (IOException e) {
// Print out the exception that occurred
System.out.println("Unable to create "+filename+": "+e.getMessage());
}
// Execution continues here after the IOException handler is executed
Here is the output:
Unable to create /nosuchdir/myfilename: The system cannot find the path specified.
Running Windows files from Java
Page 6 of 8
7. Mini Project- ITC Internet Security
Rundll32.exe is a small program provided within Windows for the purpose of running DLL’s. Think of
it as ‘Run-a-DLL’.
The Runtime class allows an application to interface with the environment in which the application is
running. The Runtime.exec() method can be used to execute non-Java applications in that
environment.
When a program starts another Windows program using Runtime.exec(), the new program can be
launched using the following syntax:
Runtime.getRuntime().exec(command);
Using Windows file association from Java
Any file already set up with the normal Windows file association mechanism can be started with the
Windows rundll32 utility.
For example:
/"file" is the filename of the data file in the "filepath"
to start Word if the doc extension is already associated with it:
Runtime.getRuntime().exec("rundll32 SHELL32.DLL,ShellExec_RunDLL " + file.getAbsolutePath());
or
Runtime.getRuntime().exec("rundll32 SHELL32.DLL,ShellExec_RunDLL ""+"filepath"+""");
Page 7 of 8