1-MATERIAL JAVA - REVISED FINALCOPY-new
1-MATERIAL JAVA - REVISED FINALCOPY-new
1-MATERIAL JAVA - REVISED FINALCOPY-new
CSE 1007 3 0 2 0 4
Pre-requisite Syllabus version
v.1.0
Course Objectives:
To understand the core language features of Java and its Application Programming
Interfaces (API) for implementing threads, exceptions, database connections, file
management and development of dynamic web applications using JavaFX GUI , Servlets
and Java Server Pages.
Text Book(s)
1. Herbert Schildt , The Complete Reference -Java, Tata McGraw-Hill publisher, 10th
Edition, 2017
2. Paul Deitel & Harvey Deitel ,”Java, How to Program”, Pearson publisher; 11th edition ,
2018.
Reference Books
1. Y. Daniel Liang, “Introduction to Java programming” -comprehensive version-11th Edition,
Pearson publisher, 2017
2. Cay Horstmann,”BIG JAVA”, 4th edition, John Wiley & Sons publisher, 5th edition, 2015
3. E.Balagurusamy, “Programming with Java”, Tata McGraw-Hill publishers, 5rd edition, 2014.
4 Paul J. Deitel, Harvey Deitel ,Java SE8 for Programmers (Deitel Developer Series) Prentice
Hall publisher, 3rd Edition, 2014
.
Mode of Evaluation:
List of Challenging Experiments (Indicative) SLO: 14
1. Write a program to demonstrate the knowledge of students in
multidimensional arrays and looping constructs.
Eg., If there are 4 batches in BTech - “CSE1007” course, read the
count of the slow learners (who have scored <25) in each batch. Tutors
should be assigned in the ratio of 1:4 (For every 4 slow learners, there
should be one tutor). Determine the number of tutors for each batch.
Create a 2-D jagged array with 4 rows to store the count of slow
learners in the 4 batches. The number of columns in each row should
be equal to the number of groups formed for that particular batch ( Eg.,
If there are 23 slow learners in a batch, then there should be 6 tutors
and in the jagged array, the corresponding row should store 4, 4, 4, 4,
4,3). Use for-each loop to traverse the array and print the details. Also
print the number of batches in which all tutors have exactly 4 students.
2. Write a program to demonstrate the knowledge of students in String
handling.
Eg., Write a program to read a chemical equation and find out the
count of the reactants and the products. Also display the count of the
number of molecules of each reactant and product.
Eg., For the equation, 2NaOH + H2SO4 -> Na2SO4+ 2H2O, the O/P
should be as follows.
Eg: Assume that a bank maintains two kinds of accounts for customers, one
called as savings account and the other as current account. The savings
account provides compound interest and withdrawal facilities but no
cheque book facility. The current account provides cheque book facility but
no interest. Current account holders should maintain a minimum balance
and if the balance falls below this level, a service charge is imposed.
Create a class account that stores customer name, account number and type
of account. From this, derive the classes cur_acct and sav_acct to make
them more specific to their requirements. Include necessary member
functions in order to achieve the following tasks :
Eg., Read the Register Number and Mobile Number of a student. If the
Register Number does not contain exactly 9 characters or if the Mobile
Number does not contain exactly 10 characters, throw an
IllegalArgumentException. If the Mobile Number contains any character
other than a digit, raise a NumberFormatException. If the Register Number
contains any character other than digits and alphabets, throw a
NoSuchElementException. If they are valid, print the message ‘valid’ else
‘invalid’
6 Write a program to demonstrate the knowledge of students in
multithreading.
Eg., Three students A, B and C of B.Tech- II year contest for the PR
election. With the total strength of 240 students in II year, simulate the vote
casting by generating 240 random numbers (1 for student A, 2 for B and 3
for C) and store them in an array. Create four threads to equally share the
task of counting the number of votes cast for all the three candidates. Use
synchronized method or synchronized block to update the three count
variables. The main thread should receive the final vote count for all three
contestants and hence decide the PR based on the values received.
7 Write a program to demonstrate the knowledge of students in File handling.
Eg., Define a class ‘Donor’ to store the below mentioned details of a blood
donor.
Name, age, Address, Contact number, blood group, date of last
donation
Create ‘n’ objects of this class for all the regular donors at Vellore. Write
these objects to a file. Read these objects from the file and display only
those donors’ details whose blood group is ‘A+ve’ and had not donated for
the recent six months.
8 Write a program to demonstrate the knowledge of students in working with
Java collection framework.
Eg., Assume only a maximum of 3 courses can be registered by a student
for week end semester classes. Create a hashmap ‘h1’ with ‘n’ key-value
pairs where keys are the names of students and values are the courses
registered by them. Create another hashmap ‘h2’ with ‘m’key-value pairs
where keys are the names of courses offered for B.Tech and values are the
names of faculty handling the courses. Write appropriate code to
For the student “B”, faculty should be displayed as 333 and 444.
9 Write a program to demonstrate the knowledge of students in GUI
programming using JavaFX.
10 Write a program to demonstrate the knowledge of students in JDBC.
Eg: Create a student table with fields roll number, name, percentage. Insert
values in the table. Display all the details of the student table in a tabular
format on the screen.
11 Write a program to demonstrate the knowledge of students in Servlet
programming.
Eg., Write a servlet which counts how many times a user has visited a web
page. If the user is visiting the page for the first time, display a welcome
message. If the user is re-visiting the page, display the number of times
visited. (Use cookies)
Mode of evaluation:
Recommended by Board of Studies DD-MM-YYYY
Approved by Academic Council No. xx Date DD-MM-YYYY
Session-wise Plan