Enterprise Programming LAB Work Book
Enterprise Programming LAB Work Book
Team EP
K L UNIVERSITY | ENTERPRISE PROGRAMMING – 18CS3210
18CS3210 ENTERPRISE PROGRAMMING
LABORATORY WORKBOOK
STUDENT
NAME
REG. NO
YEAR
SEMESTER
SECTION
FACULTY
1
18CS3210 ENTERPRISE PROGRAMMING
Table of Contents
Organization of the STUDENT LAB WORKBOOK ............................................................. 3
1. HTML-CSS-JS .................................................................................................................... 6
2. JAVASCRIPT-1 ................................................................................................................. 18
3. JAVASCRIPT-2....................................................................................................................... 25
4. JDBC .................................................................................................................................. 32
5. SERVLETS ........................................................................................................................ 47
6. JSP (Java Server Pages) ....................................................................................................... 56
7. SESSION HANDLING....…………………………………...…………………………………….62
8. HIBERNATE ....…………………………..………………...………………………………..72
9. HQL, HCQL…….........………………….……………………………………………………83
13. SPRING-DAO,MVC..…………………………………….……………………………….138
2
18CS3210 ENTERPRISE PROGRAMMING
The laboratory framework includes a creative element but shifts the time-intensive
aspects outside of the Two-Hour closed laboratory period. Within this structure, each
laboratory includes three parts: Prelab, In-lab, and Post-lab.
a. Pre-Lab
The Prelab exercise is a homework assignment that links the lecture with the laboratory
period - typically takes 2 hours to complete. The goal is to synthesize the information they
learn in lecture with material from their textbook to produce a working piece of software.
Prelab Students attending a two-hour closed laboratory are expected to make a good-faith
effort to complete the Prelab exercise before coming to the lab. Their work need not be
perfect, but their effort must be real (roughly 80 percent correct).
b. In-Lab
The In-lab section takes place during the actual laboratory period. The First hour of
the laboratory period can be used to resolve any problems the students might have
experienced in completing the Prelab exercises. The intent is to give constructive
feedback so that students leave the lab with working Prelab software - a significant
accomplishment on their part. During the second hour, students complete the In-lab
exercise to reinforce the concepts learned in the Prelab. Students leave the lab having
received feedback on their Prelab and In-lab work.
c. Post-Lab
The last phase of each laboratory is a homework assignment that is done following the
laboratory period. In the Post-lab, students analyse the efficiency or utility of a given
system call. Each Post-lab exercise should take roughly 120 minutes to complete.
3
18CS3210 ENTERPRISE PROGRAMMING
In-Lab
Sl Pre-Lab Post Lab Viva Voce Total Faculty
No Date Experiment Name (5M) LOGIC EXECUTION RESULT ANALYS (5M) (5M) (50M) Signature
(10M) (10M) (10 M) IS (5M)
4
18CS3210 ENTERPRISE PROGRAMMING
In-Lab
Sl Pre-Lab Post Lab Viva Voce Total Faculty
Date Experiment Name LOGIC EXECUTIO RESUL ANALYS
No (5M) (10M) N (10M) T IS (5M)
(5M) (5M) (50M) Signature
(10M)
10
11
12
13
14
5
18CS3210 ENTERPRISE PROGRAMMING
HTML-CSS-JS #1
Prerequisite:
General idea of how webpages are built.
General Idea on the main language or platform used for web-design.
Idea on tags of HTML, CSS and JavaScript.
Pre-Lab Task:
1) What is the full form of HTML?
3) Write down the functionalities and syntax of the below mentioned tags in HTML.
a) <!DOCTYPE>
b) <div>
c) <head>
6
17CS3116 ENTERPRISE PROGRAMMING
d) <body>
e) <h1> to <h6>
f) <li>
g) <div>
h) <form>
i) <img>
j) <title>
7
17CS3116 ENTERPRISE PROGRAMMING
b) padding
c) background
d) border
e) border-radius
f) position
g) font-family
8
18CS3210 ENTERPRISE PROGRAMMING
5) As you’re in the very beginning stage of learning how to build websites. Let’s begin by writing
a small code in HTML. Please follow the below instructions in order to complete the task.
a) Write the basic required syntax for the HTML document and save the file with .html
format.
b) Then, write the heading as “Basic HTML Program” into the document.
c) Write the paragraph as “This is the trail program for building my skills in HTML”.
d) Insert an image of your choice and specify the width to be 200px.
9
18CS3210 ENTERPRISE PROGRAMMING
In Lab Task:
1. Ricky Dowlin and his friends are in very starting stage of learning and experimenting how to build
a website, they wanted to build their personal blogs with a standard requirement as mentioned
below in order to have all their personal blogs to be same.
a. They want webpage to be segregated into 3 divisions namely header, body, footer.
b. They want the background color to be black.
c. They named their website title to be Ricky Dowlin.
d. They wanted the main heading in the website to be as their name along with personal
blog and wanted it to be displayed in the middle of the header division.
a. Ex: If the name is Ricky then the heading would be Ricky’s Personal Blog.
e. They wanted header color to be skyblue and the font color need to be black, they even
wanted to have the font to be helvetica.
f. In the body division they need to get an image inserted in the center having the
dimensions of width = 300 and height = 300.
g. Now they need to write their biodata below to the image inserted.
h. After inserting the biodata Ricky wants the user to review his blog. So he want to write
a line specifying “Please review my blog” and place a RATE button below that.
i. They wanted footer containing “copyrights reserved ©” in antique white color and
wanted to align in the center of the footer.
10
18CS3210 ENTERPRISE PROGRAMMING
11
18CS3210 ENTERPRISE PROGRAMMING
12
18CS3210 ENTERPRISE PROGRAMMING
2. After looking at your webpage they wanted you to also do the review form for their personal blog.
The form should be created in another webpage. The form webpage needs to be linked by using
the button naming “Rate” in the first webpage and should have the following details:
NAME (max 30 characters a-z and A-Z)
SUBMIT
13
18CS3210 ENTERPRISE PROGRAMMING
14
18CS3210 ENTERPRISE PROGRAMMING
15
18CS3210 ENTERPRISE PROGRAMMING
3. Honey is learning JavaScript and she wanted to write a program in which she wants to read
two number from the console and add them. After adding them she wants to check whether
it is an Even number or Odd number and print the output. Help Honey by writing the code.
16
18CS3210 ENTERPRISE PROGRAMMING
17
18CS3210 ENTERPRISE PROGRAMMING
JAVASCRIPT #2
Prerequisite:
Basic idea on JavaScript Arrays and objects.
Pre-Lab Task:
Problem Description
1. Jack and Jill were participating in a coding rivalry. There are 4 rounds to be a finalist. In the first
round the two of them were asked to illuminate the inquiry on strings wherein the inquiry was
plainly referenced that the lowercase letters should be changed over as uppercase letters and the
uppercase letters should be changed over into lowercase letters. In this way, would you be able to
help Jack and Jill to tackle their concern by executing the code in JavaScript.
For example,
INPUT: This is a Coding Competition
OUTPUT: tHIS IS A cODING cOMPETITION
18
18CS3210 ENTERPRISE PROGRAMMING
19
18CS3210 ENTERPRISE PROGRAMMING
In Lab Task:
1. Ibrahim is a making site to take care of mathematics issues in all respects effectively. To do this
he has to make a calculator as a piece of site. Can you help him by making a calculator?
a. Create a button for each operation.
b. Display the obtained result on a new window.
20
18CS3210 ENTERPRISE PROGRAMMING
21
18CS3210 ENTERPRISE PROGRAMMING
22
18CS3210 ENTERPRISE PROGRAMMING
1. John, a curator in University of Michigan needs to sort every one of the books dependents on title
of the book in Alphabetical request to keep up the record of books present in the library. He was
supposed to write a program to sort all the book titles in Alphabetical order and place them
accordingly. To compose the code he needs some assistance from a coder who can code. So,
implement a code in JavaScript where you’ll be taking array of objects as input and sort them
alphabetically based on the title of the book.
Sample object:
var library = [
{author: 'Bill Gates', title: 'The Road Ahead', libraryID: 1254},
{author: 'Steve Jobs', title: 'Walter Isaacson', libraryID: 4264},
{author: 'Suzanne Collins', title: 'Mockingjay: The Final Book of The Hunger Games',
libraryID: 3245}
];
23
18CS3210 ENTERPRISE PROGRAMMING
24
18CS3210 ENTERPRISE PROGRAMMING
Prerequisite:
General Idea on JavaScript DOM and Validations.
Idea on Event Listener and onchange Events.
Pre-Lab Task:
1. Drishti and Shiv are playing Ludo and they lost their dice. Since Drishti is a coder she thought to
write a code in JavaScript in which it generated a random number between 1 to 6 on clicking a
button, and she wanted to add a feature that when the number generated is odd, the background
changes to red otherwise the background changes to green. Assuming you as Drishti implement a
code in JavaScript.
25
18CS3210 ENTERPRISE PROGRAMMING
26
18CS3210 ENTERPRISE PROGRAMMING
In Lab Task:
1. Rohan wants to watch a horror movie. He is filling his details in the form given by ABC ticket
booking app. Create a form which follows following condition (Use JavaScript validations)
a. Create first name and last name columns. Once user leaves the column, input must change
to uppercase. (Use onchange event)
b. Create an age column using the type “text”. Validate the input and show an error message
if age is less than 18.
c. Create phone number field and make it mandatory field. Validate the input and show
a message if any error.
d. Create an email id field with the type “email” and make the field mandatory.
e. Create a dropdown list to select number of tickets.
f. Create a checkbox saying I accept to all terms and conditions and make it mandatory field.
g. Finally create a submit button which gives an alert message “Do you want to submit? (Use
Event Listener)
27
18CS3210 ENTERPRISE PROGRAMMING
28
18CS3210 ENTERPRISE PROGRAMMING
29
18CS3210 ENTERPRISE PROGRAMMING
30
18CS3210 ENTERPRISE PROGRAMMING
31
18CS3210 ENTERPRISE PROGRAMMING
JDBC #4
Date of the Session: ___/___/___ Time of the Session: _____to______
Prerequisite:
How a java program is connected to database
Basic SQL commands to perform ‘CRUD’ operations
Pre-Lab Task:
1.
a. List out different kinds of JDBC drivers.
b. Write the steps involved in connecting any java application with data base using JDBC.
32
18CS3210 ENTERPRISE PROGRAMMING
i. forName()
ii. registerDriver()
iii. getConnection()
iv. createStatement()
v. prepareStatement()
33
18CS3210 ENTERPRISE PROGRAMMING
vi. executeQuery()
vii. executeUpdate()
viii. close()
ix. setBinaryStream()
x. setCharacterStream()
xi. available()
34
18CS3210 ENTERPRISE PROGRAMMING
35
18CS3210 ENTERPRISE PROGRAMMING
36
18CS3210 ENTERPRISE PROGRAMMING
In Lab Task:
1. Dany went to the kings landing supermarket and bought some groceries. As a vendor you have
to ask the numbers of items she bought and store the itemid, itemname, cost of the items and
store them in the ‘sales’ table of database and also execute an SQL query to find the total cost
and list out the item she bought.
37
18CS3210 ENTERPRISE PROGRAMMING
18CS3210 ENTERPRISE PROGRAMMING
2. A workshop based on web development is being conducted in the university. Now James wants
to know how many members of his class are interested in it and their details.
a. He created a new table namely Student in the Oracle Database with columns:
Student_ID, Student_Name, Email, Date_of_Birth.
b. He stored some records into the Student table.
c. He needs to collect ID numbers and contact numbers of the interested students in
a new table called "Workshop".
d. He wants to retrieve name and email address from the student table and update the
Workshop table by creating 2 new columns and inserting the respective details.
e. If a student, suddenly wants to drop from attending the workshop, James is supposed
to delete the student's data from workshop table.
Write the Java programs for the above situations using JDBC API.
Writing space for the Problem:(For Student’s use only)
38
18CS3210 ENTERPRISE PROGRAMMING
39
18CS3210 ENTERPRISE PROGRAMMING
40
18CS3210 ENTERPRISE PROGRAMMING
41
18CS3210 ENTERPRISE PROGRAMMING
42
18CS3210 ENTERPRISE PROGRAMMING
43
18CS3210 ENTERPRISE PROGRAMMING
2. After exploring the dense forest, Tony returns to home and wants to publish his work in a
magazine. He is supposed to give the information to the publisher in the following way.
a. Two folders namely Animals and Plants should be created on desktop
b. The image of every animal should be saved as "animal_name.jpg" and the
description file as "animal_name.txt" in the Animal folder
c. Similarly, the image of every plant should be saved as "plant_name.jpg"
and the description file as "plant_name.txt" in the Plant folder
44
18CS3210 ENTERPRISE PROGRAMMING
45
18CS3210 ENTERPRISE PROGRAMMING
46
18CS3210 ENTERPRISE PROGRAMMING
Servlets #5
Prerequisite:
Servlets and their applications.
‘CRUD’ operations in SQL.
Pre-Lab Task:
1. Write a note on servlet and its life cycle.
2. Draw the Structure of directories that are to be created under Tomcat’s ‘webapps’ folder.
47
18CS3210 ENTERPRISE PROGRAMMING
3. Create a project named ‘myservice’ and using servlets make a service which prints “Welcome
to Servlets!!” on to the server console. The class must be named ‘FirstServlet’ and the URL
pattern must be ‘/your_name’.
Add another service into the same ‘myservice’ project which prints “Bye to Servlets!!” on to
the server console. Name the class ‘SecondServlet’ and set URL pattern to ‘/your_name143’.
(Hint: Modify the ‘web.xml’ file by adding another servlet name and URL pattern.)
Check the working condition of both the services.
48
18CS3210 ENTERPRISE PROGRAMMING
49
18CS3210 ENTERPRISE PROGRAMMING
In Lab Task:
1. A professor from K L University after 21 years of Work he decided to retire from his job and
before he leaves, he wants to get feedback about him from all his students. As you are his favorite
student, he asked you for help, so, you decided to make a Web app using servlets in which the
students must first register and then login into it with the registered credentials, which in turn gives
a page and Asks for remarks , the students can type and submit their views in it and this login
credentials and remarks must be stored into ‘farewell’ table in database. He wants everyone to
register and login because he wants to know how every particular student think about him.
50
18CS3210 ENTERPRISE PROGRAMMING
51
18CS3210 ENTERPRISE PROGRAMMING
52
18CS3210 ENTERPRISE PROGRAMMING
53
18CS3210 ENTERPRISE PROGRAMMING
54
18CS3210 ENTERPRISE PROGRAMMING
55
18CS3210 ENTERPRISE PROGRAMMING
Prerequisite:
Knowledge of JSP.
Basic SQL commands to perform ‘CRUDs’ operations
Pre-Lab Task:
56
18CS3210 ENTERPRISE PROGRAMMING
57
18CS3210 ENTERPRISE PROGRAMMING
In Lab Task:
1. Julie needs to set up a startup. Make Registration for web based shopping entrance made by
her. Make an enrolment page where users can create an account for themselves.
58
18CS3210 ENTERPRISE PROGRAMMING
59
18CS3210 ENTERPRISE PROGRAMMING
1. From previous problem, after client registers, demonstrate a login page where client can login
just on the off chance that he submits right certifications.
60
18CS3210 ENTERPRISE PROGRAMMING
61
18CS3210 ENTERPRISE PROGRAMMING
SESSION HANDLING#7
Date of the Session: / / Time of the Session: ___to___
Prerequisite:
Basic idea on Session handling techniques.
Pre-Lab Task:
1. What is session tracking? Why is session tracking used?
2. What are different types of session tracking techniques? Write few real-life examples for
each session tracking technique.
3. Understand how a cookie works. Write syntax to create a cookie and store values, access and
delete them.
62
18CS3210 ENTERPRISE PROGRAMMING
In Lab Task:
1. Kamal needs to login to his Gmail account but he forgot his secret password. Create a login form
where he enters his username and password. As password is wrong, show a message which says
“Wrong Password” and forgot password link is shown. When user clicks it, use URL redirect method
to display username entered in login form and change his password by displaying password field.
Writing space for the Problem:(For Student’s use only)
63
18CS3210 ENTERPRISE PROGRAMMING
64
18CS3210 ENTERPRISE PROGRAMMING
2. Udemy is a site which gives online courses of various domains. This site chooses the cost of the
course dependent on number of visits to the site from your account. If number of visits are more, cost
is more. Discover number of times client tapped on any course from his account.
Writing space for the Problem:(For Student’s use only)
65
18CS3210 ENTERPRISE PROGRAMMING
66
18CS3210 ENTERPRISE PROGRAMMING
67
18CS3210 ENTERPRISE PROGRAMMING
68
18CS3210 ENTERPRISE PROGRAMMING
69
18CS3210 ENTERPRISE PROGRAMMING
70
18CS3210 ENTERPRISE PROGRAMMING
71
18CS3210 ENTERPRISE PROGRAMMING
HIBERNATE-1#8
Date of the Session: / / Time of the Session: ___to___
Prerequisite:
Basic idea on Hibernate
Pre-Lab Task:
1. What is ORM tool?
72
18CS3210 ENTERPRISE PROGRAMMING
73
18CS3210 ENTERPRISE PROGRAMMING
In Lab Task:
1. Sreenivas, the proprietor of a rice mill, needs to keep up the information about the rice bags
produced at his mill. He wants to save the cost, type of the rice (polished/ non-polished) and
amount in kilograms for each bag. Write a hibernate application to insert the details of bags
manufactured. The application should ask the user whether he wants to insert a details of a bag
each time until he says 'no'. For every 'yes' it should gather the details of the bag i.e, the id
number, amount, cost and type.
74
18CS3210 ENTERPRISE PROGRAMMING
75
18CS3210 ENTERPRISE PROGRAMMING
2. Now Sreenivas, wants to sell a bag to a customer. he knows the id number of the bag and needs to
retrieve the cost. Sreenivas doesn't encourage bargaining. So if the customer wants to buy the bag
at the same value then he sells the bag and erases information about that bag. Write the hibernate
application which asks the id number of the bag, displays the price of that bag, and then asks
whether the customer wants to purchase the bag or not. If 'yes' then the details of the bag should be
erased. (Note: Write only the java file with logic. While executing, implement the POJO, mapping,
configuration files of previous question, since we are operating on same data)
76
18CS3210 ENTERPRISE PROGRAMMING
77
18CS3210 ENTERPRISE PROGRAMMING
78
18CS3210 ENTERPRISE PROGRAMMING
79
18CS3210 ENTERPRISE PROGRAMMING
80
18CS3210 ENTERPRISE PROGRAMMING
81
18CS3210 ENTERPRISE PROGRAMMING
82
18CS3210 ENTERPRISE PROGRAMMING
HQL, HCQL #9
Date of the Session: / / Time of the Session: ___to___
Prerequisite:
Pre-Lab Task:
1. Write the HQL query to find the count of red colored bottles and of quantity 1 litre.
2. Write the HQL query to get data of the first 10 bottles which are microwave safe ( i.e, the
value of microwave safe is “yes”) in ascending order with respect to the quantity.
th th
3. Write the HCQL query to get the 15 to 30 record.
83
18CS3210 ENTERPRISE PROGRAMMING
4. Write the HCQL query to get the records who salary is greater than 150000.
5. Write the HCQL query to get the records in ascending order on the basis of salary.
84
18CS3210 ENTERPRISE PROGRAMMING
In Lab Task:
1. Stoins is the manager of Minimal Cube company. He maintains the records of employees
working in his company. Create a java class where he gets and sets the values of EmpID,
EmpName, EmpSalary, EmpAddress. Use Hibernate Frame-work to reduce manual work.
When employees are terminated he is likely to delete the record of employee in his database
and update the data when it is required. After performing all the operations he is likely to know
the employees working in his company at the end of every month, so retrieve the data those
who are working in his company. Create separate java class for retrieving, updating and
deleting so that the Mr. Stoins can easily work when an employee data needs to update, delete
or retrieve. Use Concept of HCQL (Hibernate Criteria Query Language).
85
18CS3210 ENTERPRISE PROGRAMMING
86
18CS3210 ENTERPRISE PROGRAMMING
87
18CS3210 ENTERPRISE PROGRAMMING
88
18CS3210 ENTERPRISE PROGRAMMING
89
18CS3210 ENTERPRISE PROGRAMMING
1. Mr. Deekshit is running an Online Shopping website where shopping take place in his website
regularly. So he decided to maintain two different tables namely ORDER containing attributes
like ID, ORDERDATE, ORDRENUMBER, CUSTOMERID, TOTALAMOUNT where ID is
primary key and another table describing CUSTOMER (ID, FIRSTNAME, LASTNAME,
CITY, COUNTRY, PHONE) where ID will not have a null value. By using JOINS through
Hibernate Frame-work help Mr.Deekshit to know the details of customer and items customer
purchased. Display Order-number, Total-amount, First-name, Last-name, City, Country using
ORDER.ID and CUSTOMER.ID.
90
18CS3210 ENTERPRISE PROGRAMMING
91
18CS3210 ENTERPRISE PROGRAMMING
92
18CS3210 ENTERPRISE PROGRAMMING
93
18CS3210 ENTERPRISE PROGRAMMING
94
18CS3210 ENTERPRISE PROGRAMMING
Prerequisite:
Basic idea on Hibernate Framework
Pre-Lab Task:
1. What is Inheritance Mapping and List out Inheritance Mapping Hierarchy.
95
18CS3210 ENTERPRISE PROGRAMMING
In Lab Task:
1. A Bank Customer wants to try Inheritance through Table per class Hierarchy so he created a base
class named Payment, containing attributes like paymentId, amount and two derived classes
namely CreditCard consisting type of CreditCard they used and Cheque containing type of
cheque. So, when the object of derived class is saved, object of base class will also get stored in
the database in a single table. To know the Object of which class is stored we must use the
Discriminator column. Apply Concept of Table per Class Hierarchy through Hibernate Frame
Work.
96
18CS3210 ENTERPRISE PROGRAMMING
97
18CS3210 ENTERPRISE PROGRAMMING
98
18CS3210 ENTERPRISE PROGRAMMING
99
18CS3210 ENTERPRISE PROGRAMMING
100
18CS3210 ENTERPRISE PROGRAMMING
2. Mr. Robert Hiezman is a Manager at Company. Create a class where it gets and set the values
like name and Id of employee. They hire different types of employees like regular employee
who has salary, bonus they get and contract employee who has amount they earn per hour and
time duration they work. Use Concept of Table per Concrete Class Hierarchy through Hibernate
FrameWork and observe the Structure of data stored in the database.
101
18CS3210 ENTERPRISE PROGRAMMING
102
18CS3210 ENTERPRISE PROGRAMMING
103
18CS3210 ENTERPRISE PROGRAMMING
104
18CS3210 ENTERPRISE PROGRAMMING
105
18CS3210 ENTERPRISE PROGRAMMING
106
18CS3210 ENTERPRISE PROGRAMMING
107
18CS3210 ENTERPRISE PROGRAMMING
108
18CS3210 ENTERPRISE PROGRAMMING
Prerequisite:
General idea on Spring Framework
Modules of Spring Framework
Pre-Lab Task:
1. What is a spring?
109
18CS3210 ENTERPRISE PROGRAMMING
In Lab Task:
1. Geetha is creating a website which displays the marks of student from two different java
classes. So, define two different java beans and input attributes in Student.java like
studentId, studentName and Marks.java which containing clear segregation of marks
scored in each subject. Use Spring FrameWork to display all the details of each student to
the browser.
110
18CS3210 ENTERPRISE PROGRAMMING
111
18CS3210 ENTERPRISE PROGRAMMING
112
18CS3210 ENTERPRISE PROGRAMMING
113
18CS3210 ENTERPRISE PROGRAMMING
114
18CS3210 ENTERPRISE PROGRAMMING
2. Mr.Deepak is very keen and interested to overcome tight coupling in java so he used
Spring Framework with Dependency injection mechanism, he created a class traveler
containing an interface vehicle and a method startJourney calling a move method when
a journey starts. He creates another two classes bike and car which implements the
vehicle class, creates a object for vehicle when a journey starts. To know which vehicle
is being used he is calling the method move with vehicle object so that the message will
display which is present in implemented classes.
115
18CS3210 ENTERPRISE PROGRAMMING
116
18CS3210 ENTERPRISE PROGRAMMING
117
18CS3210 ENTERPRISE PROGRAMMING
118
18CS3210 ENTERPRISE PROGRAMMING
119
18CS3210 ENTERPRISE PROGRAMMING
1. Ms.Varsha wants to develop an application using Spring FrameWork to display all the
details of each employee to the browser. It displays the address of employee from two
different java class, so define different java beans and input attributes in Employee.java like
empId, empName and Address.java which contains clear address of each person.
120
18CS3210 ENTERPRISE PROGRAMMING
121
18CS3210 ENTERPRISE PROGRAMMING
122
18CS3210 ENTERPRISE PROGRAMMING
123
18CS3210 ENTERPRISE PROGRAMMING
Prerequisite:
Basic knowledge on hibernate and spring integration
Pre-Lab Task:
124
18CS3210 ENTERPRISE PROGRAMMING
125
18CS3210 ENTERPRISE PROGRAMMING
In Lab Task:
1. The Navodaya Johar school is wanting to direct a get-together of their 2014-2015 batch
students. To design this occasion and oversee, principal appointed a student from a similar
batch. To do this the student needed to make hibernate application with spring application. He
initially made a table in database to store the subtleties of his companions who are going to the
gathering. He made the table with the name Reunion with properties ID No, Name, Contact
Number, Amount paid, and Status. ID.NO being the primary key has the most extreme size of
4 digits and Status speaks to how much sum has been paid i.e; completely paid, or partially
paid, or not paid. Note that the sum should be paid to go to the gathering is 2000 rupees. Now
he needs to make a java project with springs and hibernate integration. Help him in Creating
three unique classes for inserting subtleties in database. First make a class for inserting the
details of the students who are going to the get-together gathering. Presently make another
class for retrieving the amount paid by the students.
126
18CS3210 ENTERPRISE PROGRAMMING
127
18CS3210 ENTERPRISE PROGRAMMING
128
18CS3210 ENTERPRISE PROGRAMMING
129
18CS3210 ENTERPRISE PROGRAMMING
130
18CS3210 ENTERPRISE PROGRAMMING
131
18CS3210 ENTERPRISE PROGRAMMING
132
18CS3210 ENTERPRISE PROGRAMMING
1. Now to the extension to the last question create a class file in the same java project for
updating the database If the student want to pay the amount then update the amount in data
base and print the total amount he paid till then and if he had paid the total amount the change
the status to fully paid. If not then show the amount that need to be paid by him. Also create a
class file for deleting the details of students who cancelled their plan of going go get-together
as a result of some issues.
Writing space for the Problem:(For Student’s use only)
133
18CS3210 ENTERPRISE PROGRAMMING
134
18CS3210 ENTERPRISE PROGRAMMING
135
18CS3210 ENTERPRISE PROGRAMMING
136
18CS3210 ENTERPRISE PROGRAMMING
137
18CS3210 ENTERPRISE PROGRAMMING
SPRING-DAO #13
Date of the Session: / / Time of the Session: ___to___
Prerequisite:
Basic idea on Spring -DAO
Pre-Lab Task:
1. What is DAO?
3. What are the problems faced if data is accessed directly without objects?
138
18CS3210 ENTERPRISE PROGRAMMING
139
18CS3210 ENTERPRISE PROGRAMMING
In Lab Task:
1. Revanth is a student who has a great startup plan but he wants students to work with
him. So, students who are interested in startup can contact him. Revanth decided to
conduct an interview for the interns and store the details who appeared (Name, ID,
Mail, skills of every student) in the “student” table (Name varchar2(30), ID number,
Mail varchar2(30), skills varchar2(100)). He Inserts all the details of people during
interview and deletes the details people who are below par at the end of the day. So, by
using “Data Access object” pattern create a student object which act as a model and
create a concrete class and implement Data Access Object Interface and use a
Democlass to access the insert, delete methods.
Writing space for the Problem:(For Student’s use only)
140
18CS3210 ENTERPRISE PROGRAMMING
141
18CS3210 ENTERPRISE PROGRAMMING
142
18CS3210 ENTERPRISE PROGRAMMING
143
18CS3210 ENTERPRISE PROGRAMMING
144
18CS3210 ENTERPRISE PROGRAMMING
145
18CS3210 ENTERPRISE PROGRAMMING
146
18CS3210 ENTERPRISE PROGRAMMING
147
18CS3210 ENTERPRISE PROGRAMMING
148
18CS3210 ENTERPRISE PROGRAMMING
149
18CS3210 ENTERPRISE PROGRAMMING
150
18CS3210 ENTERPRISE PROGRAMMING
151
18CS3210 ENTERPRISE PROGRAMMING
152