Advance Java course work under NCC Education June 2011
1. Statement and Confirmation of Own Work
Programme/Qualification name:
Each NCC Education assessed assignment submitted by you must have this statement attached to
the assignment as the cover page or it will not be accepted for marking. Please ensure that this
statement is either firmly attached to the cover of the assignment or electronically inserted into the
front of the assignment.
Student declaration
I have read and understood NCC Education’s Policy on Academic Dishonesty and
Plagiarism.
I can confirm the following details:
Student ID/Registration number: 00120142
Name: Md. Mahbub Alam
Centre Name: Daffodil Institute of IT
Module Name: Internet System Administration
Module Leader: Mr. Shamsuddin Ahmmad
Number of words:
I confirm that this is my own work and that I have not plagiarized any part of it. I
have also noted the assessment criteria and pass mark for assignments.
Due Date:
Student Signature:
Submitted Date:
2. Acknowledgment:
I am Md. Mahbub Alam is grateful to Daffodil Institute of IT (DIIT) for giving the chance to
doing the assignment in the field of Advance Java and it’s such a pleasure to me. I am also
grateful & like to express thanks to Mr. Shamsuddin Ahammad Lecturer of Advance Java of
DIIT. His continues support, concentration & encouragement help me to complete this
assignment. Huge unknown things are now know to me by doing this assignment. In class
room we collect theoretical knowledge about Advance Java but practically I gather
knowledge by doing this assignment. It was a glorious memory by doing this assignment in
my Life.
Advanced Java June 2011 Final @NCC Education 2011
3. Task 1:
Problem Statement:
Design the database required to drive the outline specification.
Set up the structure of this database using a DBMS.
Design suitable test data and use it to populate the database that you have just set up.
Design and set up a separate simple database to record members’ feedback comments.
Introduction: In this task I have to create an Entity relationship diagram and data dictionary of the
system. I have to describe about aim and objectives of the System.
Entity Relationship Diagram (ERD):
Advanced Java June 2011 Final @NCC Education 2011
4. Normalized Entity Tables:
Table Name: Bicycle Detail
Field Name Data Type Length Null?
Primary
Key
Foreign
Key
Ref Table On Delete On Update
Bicycle Detail ID INTEGER 5
Not
null
Yes No - - -
Make
DATE
TIME
Not
null
No No - - -
Model VARCHAR 15 Null No No - - -
Type VARCHAR 15 Null No No - - -
Frame Size INTEGER 2
Not
null
No No - - -
Wheel Size INTEGER 2
Not
null
No No - - -
Colour VARCHAR 10 Null No No - - -
Number Of Gears INTEGER 1
Not
Null
No No - - -
Basic Price INTEGER 4
Not
Null
No No - - -
Retailer ID INTEGER 5
Not
Null
No Yes Retailer CASCADE CASCADE
Table Name: Retailer
Field Name Data Type Length Null?
Primary
Key
Foreign
Key
Ref
Table
On Delete On Update
Retailer ID INTEGER 5
Not
null
Yes No - - -
Name Of Retailer VARCHAR 20
Not
null
No No - - -
Postal Address VARCHAR 50
Not
null
No No - - -
Email Address VARCHAR 20
Not
null
No No - - -
Phone Number INTEGER 14
Not
null
No No - - -
Advanced Java June 2011 Final @NCC Education 2011
5. Table Name: Bicycle Option
Field Name Data Type Length Null?
Primary
Key
Foreign
Key
Ref Table
On
Delete
On
Update
Bicycle Option ID INTEGER 5
Not
null
Yes No - - -
Retailer ID INTEGER 5
Not
null
No Yes Retailer CASCADE CASCADE
Name Of Option VARCHAR 30
Not
null
No No - - -
Description of Option VARCHAR 100
Not
null
No No - - -
Price Of Option INTEGER 4
Not
null
No No - - -
Table Name: Member Information
Field Name Data Type Length Null?
Primary
Key
Foreign
Key
Ref Table
On
Delete
On
Update
Member User Name VARCHAR 10
Not
null
Yes No - - -
Password VARCHAR 20
Not
null
No No - - -
Member Name VARCHAR 20
Not
null
No No - - -
Email Address VARCHAR 20
Not
null
No No - - -
Table Name: Comment Table
Field Name Data Type Length Null?
Primary
Key
Foreign
Key
Ref Table
On
Delete
On
Update
Member User Name VARCHAR 20
Not
null
yes No
Member
Information
CASCADE CASCADE
Interests VARCHAR 20
Not
null
No No - - -
Comments VARCHAR 45
Not
null
No No - - -
Advanced Java June 2011 Final @NCC Education 2011
6. Create database using a DBMS:
Figure: MySql Query Browser Opening.
Figure: Create New Schema or Database on Bicycle name.
Advanced Java June 2011 Final @NCC Education 2011
7. Figure: Create Bicycle_Detail Table.
Figure: Create Retailer table.
Advanced Java June 2011 Final @NCC Education 2011
8. Figure: Create relation between Retailer table & Bicycle Detail Table.
Figure: Create Bicycle Option Table.
Advanced Java June 2011 Final @NCC Education 2011
9. Figure: Create relation between Retailer table & Bicycle Option Table.
Figure: Member Information Table creation on the database.
Advanced Java June 2011 Final @NCC Education 2011
10. Figure: Time of input data in the Retailer table.
Figure: Retailer table with number of data.
Advanced Java June 2011 Final @NCC Education 2011
11. Figure: Bicycle Option table with number of data insertion.
Figure: Bicycle Detail table with number of data insertion.
Advanced Java June 2011 Final @NCC Education 2011
12. Figure: Member Information table with number of data insertion.
Summary:
In the above, I complete task 1 by flowing the scenario of task 1. I describe here about Bicycle club
new system. I draw an ERD diagram on this task. Describe about Above.
Advanced Java June 2011 Final @NCC Education 2011
13. Task 2
Introduction: on this task I have to design Java server pages.
User Interface:
Figure: Log on User interface
Advanced Java June 2011 Final @NCC Education 2011
18. Flow Chart:
Figure: Flow Chart of Search Page
Summary: in the above I design the java server pages to meet the requirement of the system.
Advanced Java June 2011 Final @NCC Education 2011
START
Model, Type, Color, gear,
frameSize, wheelsize, price
if(!
model.equals(sear
chResult.get(i).get
Model()))search
form.
success.jsperror.jsp
STOP
19. Task 3
Introduction: In this task I have to write the code of Java server pages, CSS and MyEntityManager.
Coding are under the below:
CSS:
body {
color:#000000;
background-color:#B3B3B3;
margin:0;}
#container {
margin-left:auto;
margin-right:auto;
text-align:center; }
a img { border:none;}
#header{background-color:#C4D71C; font-size:70px; font-style:oblique;
color: darkgreen; font-weight: bolder; font-family:Geneva;}
#fotter{text-align: center; background-image:url(../image/footer.png);
background-position:center; background-repeat:no-repeat; text-align:center;
font-weight: bolder; font-size:16px; color:darkgreen;}
#l{text-align:left;}
#c{text-align:center;}
#r{text-align:right;}
#vl{vertical-align:middle;}
a:link,a:visited
{
display:block; font-weight:bold; color:#FFFFFF; background-color:#98bf21;
width:150px; text-align:center; padding:4px; text-decoration:none;}
a:hover,a:active{ background-color:#7A991A;}
#pageLink{ vertical-align:top; text-align:center;}
MyEntityManager:
package bicycle.beans;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.persistence.EntityManager;
import javax.transaction.UserTransaction;
public class MyEntityManager {
Context ctx;
UserTransaction utx;
EntityManager em;
Advanced Java June 2011 Final @NCC Education 2011