You are on page 1of 4

Notes :

• Go through the problem statement clearly.

• Time limit is 2 hours

• Make sure that project is created in eclipse only.

• Create all your java files in package “com” within src folder of eclipse project. Make
sure that exact class outline is followed

• After completion of your work, zip your final project folder along with the scripts and
upload the zipped project in iON. PLEASE NOTE you will be able to upload only ONCE
in iON. Hence upload your final project. The project folder will be available in your
workspace folder

• It is mandatory to upload eclipse project and not only java files for your code to be
assessed.

• Make sure that there is no compilation error in your code before submission. Even if
there is minor error, entire solution could be rejected.

• Save the create and insert scripts and upload with the zip file.

User input is not required in any of the method described. Prefer to have
hard coded values for method call.

Problem statement:

Create the Student table in the database with naming convention as

TBL_<Your Employee Id>_Student . (TBL_123445_ Student)

Column name Data Type Additional Information


StudentId NUMBER(3) PRIMARY KEY
Student_name varchar2(20)
Student_class varchar2(20)

gender vachar2(10)
Class outline for Student class is as follows :

Create the Marks table in the database with naming convention :


TBL_<Your EmployeeId>_Marks (TBL_123445_Marks)

Column name Data Type Additional Information


marks_id number(3) primary key
total_marks number(3)
studentid number(3) foreign key

Class outline for Marks class is as follows


Insert the below data in the tables :

Below data can be used for reference


Student Table :

1,Alexander,Class 1,Male
2,Smith,Class 1, Male
3 ,Pita, Class 2,Female

Marks Table :

10,300,1

20,450,2

30,200,3

Create a class StudentDAO with the below methods. Use only Prepared Statement

1) addStudent() : This method should take a student object and add to the table
and return the number of records inserted due to that query execution.

2) getStudentByName () : This method return the arraylist of female student names


in the descending order of the student name.
3) getStudentCount(): This method should print the student’s class name along
with the number of students in that class

4) getStudentWithMarks(String className) : print the student name along with


marks for all the students from a given class .

5) getStudentsWithName() Find out countries whose Names have the letter 'e' in it
.Return arraylist of student names

You might also like