0% found this document useful (0 votes)
2 views57 pages

Vac - Java Programming 06 Sem

The document outlines a Java Programming course (VACCS0601) aimed at teaching object-oriented analysis and design, programming skills, and professional documentation practices. It includes modules covering Java fundamentals, flow control, object-oriented concepts, API contents, exception handling, and threading, with a total of 30 periods. Upon completion, students will be able to create Java programs utilizing various programming constructs and error-handling techniques.

Uploaded by

pavisivan89
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views57 pages

Vac - Java Programming 06 Sem

The document outlines a Java Programming course (VACCS0601) aimed at teaching object-oriented analysis and design, programming skills, and professional documentation practices. It includes modules covering Java fundamentals, flow control, object-oriented concepts, API contents, exception handling, and threading, with a total of 30 periods. Upon completion, students will be able to create Java programs utilizing various programming constructs and error-handling techniques.

Uploaded by

pavisivan89
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

VACCS0601 JAVA PROGRAMMING

Course Objective
To impart knowledge on

• The principles and practice of object oriented analysis and design in the construction
of robust, maintainable programs which satisfy the requirements given
• Competence to design, write, compile, test and execute straightforward programs using a
high level language;
• Have an awareness of the need for a professional approach to design and the importance
of good documentation to the finished programs.
• To be able to implement, compile, test and run Java programs comprising more than
one class, to address a particular software problem.

PREREQUISITE:
1. Good programming knowledge in C++
2. Sound knowledge on the OOP Principles
3. Basic knowledge in Computer Networks

MODULE 1: Java Fundamentals

Introduction to Java – Features of java – JVM – API document – Naming conventions and Data types -
Data types in java – Operators

MODULE 2: Declarations, Initializations and Scoping


Accepting Input from the keyboard – Reading Input with Scanner class - Arrays – Single Dimensional
Array – Two dimensional Array – Jagged arrays – Strings – String-buffer and String Builder class -
Access specifier

MODULE 3: Flow Control


If else statement- do while loop – for loop – Nested for loops – for each loops – switch statement – break
statement- continue statement – return statement

MODULE 4: Object Oriented Concepts

Classes and objects – Methods in java – Relationship between objects – Inheritance – Polymorphism -
Type casting – Abstract Classes – Interfaces – Packages -

MODULE 5: API Contents


Java 3D- Java Advanced Imaging – Java Mail – Java Message Service – Java Media Framework – Java
Naming and Directory Interface – Java OpenGL

MODULE 6: Exceptions, Generics and Collections


Errors in java Program – Exception handling mechanism – throw clause- Types of Exceptions – Generic
classes – Collection objects – Sets – Lists – Queues – Maps – Stack class - Hash Set class – Array List
class
– Vector class – StringTokenzier class – Calendar class - Date class
MODULE 7: Threads
Single tasking – Multi tasking – Uses of threads – Thread class methods – Deadlock of threads – Thread
Communication – Thread priorities – Thread group – Daemon threads – Application of threads

Total Periods: 30

Assessment & Certification


➢ Continuous assessment through quizzes & assignments
➢ Final project presentation
➢ Certificate of completion issued

Outcome of the Course:


Upon completion of the course students will be able to

• Demonstrate the ability to employ various types of selection constructs in a Java program.
• Use built-in classes found in the Java API
• Create Java programs that leverage the object-oriented features of the Java language,
such as encapsulation, inheritance and polymorphism.
• Apply error-handling techniques using exception handling
• Provide solution to a given set of requirements using threads, multithreading and
synchronisation.

References :

1. [Link]
2. [Link] -with-examples/
3. [Link]
4. [Link]
Department of Computer Science and Engineering

Course Name : JAVA PROGRAMMING Course Code : VACCS0601

Year : III Sem : VI


Mode Of Presentation : BB No Of Hour : 30 Hours

Student Name List

S.
N Roll No Student Name Year/ Coordinator Resource Person
Reg. Number Course Name
Sem Name Name
o
1. 810622104001 22CS01 ABINAYA.P II/VI JAVA T. Thendral Kani C. Selva Ganesan
PROGRAMMING
2. 810622104002 22CS02 AKILA.B II/VI JAVA T. Thendral Kani C. Selva Ganesan
PROGRAMMING
3. 810622104004 22CS04 ARAVINTH.M II/VI JAVA T. Thendral Kani C. Selva Ganesan
PROGRAMMING
4. 810622104005 22CS05 ARAVINTH.V II/VI JAVA T. Thendral Kani C. Selva Ganesan
PROGRAMMING
5. 810622104006 22CS06 ARULKUMAR.A II/VI JAVA T. Thendral Kani C. Selva Ganesan
PROGRAMMING
6. 810622104007 22CS07 ARULMOZHI.K II/VI JAVA T. Thendral Kani C. Selva Ganesan
PROGRAMMING
7. 810622104008 22CS08 ASIKA.M II/VI JAVA T. Thendral Kani C. Selva Ganesan
PROGRAMMING
8. 810622104010 22CS10 BASKAR.B II/VI JAVA T. Thendral Kani C. Selva Ganesan
PROGRAMMING
9. 810622104011 22CS11 BAVAN.R II/VI JAVA T. Thendral Kani C. Selva Ganesan
PROGRAMMING

10. DHIVYADHARS II/VI JAVA T. Thendral Kani C. Selva Ganesan


810622104013 22CS13 PROGRAMMING
HINI.B

11. 810622104015 22CS15 II/VI JAVA T. Thendral Kani C. Selva Ganesan


IHSANULLAH.M
PROGRAMMING
12. 810622104016 22CS16 II/VI JAVA T. Thendral Kani C. Selva Ganesan
JAGAN.P
PROGRAMMING
13. 810622104017 22CS17 II/VI JAVA T. Thendral Kani C. Selva Ganesan
KAVIYA.R
PROGRAMMING

14. LOKESHWARAN II/VI JAVA T. Thendral Kani C. Selva Ganesan


810622104019 22CS19 PROGRAMMING
.B
15. MOHAMED II/VI JAVA T. Thendral Kani C. Selva Ganesan
810622104021 22CS21 PROGRAMMING
ALI.A

16. 810622104022 22CS22 II/VI JAVA T. Thendral Kani C. Selva Ganesan


MUGILAN.M
PROGRAMMING

17. MUTHUPANDIY II/VI JAVA T. Thendral Kani C. Selva Ganesan


810622104023 22CS23
AN.K PROGRAMMING

SUBASH II/VI JAVA T. Thendral Kani C. Selva Ganesan


18. 810622104032 22CS32 CHANDRABOSE. PROGRAMMING
K

19 810622104033 22CS33 SUMITHRA.V II/VI JAVA T. Thendral Kani C. Selva Ganesan


PROGRAMMING
20 810622104034 22CS34 TAMILSELVI S II/VI JAVA T. Thendral Kani C. Selva Ganesan
PROGRAMMING
21 810622104035 22CS35 VAIDEKI.K II/VI JAVA T. Thendral Kani C. Selva Ganesan
PROGRAMMING
22 810622104037 22CS37 VEERASEKAR.R II/VI JAVA T. Thendral Kani C. Selva Ganesan
PROGRAMMING

23 VIJAYAKUMAR. II/VI JAVA T. Thendral Kani C. Selva Ganesan


810622104040 22CS40
R PROGRAMMING

24 23LCS3 II/VI JAVA T. Thendral Kani C. Selva Ganesan


810622104301 KEERTHANA S
01 PROGRAMMING

25 810622104350 24RCS4 II/VI JAVA T. Thendral Kani C. Selva Ganesan


RAJESHWARI PROGRAMMING
1 2
Student Name List

Week 1 Week 2 Week 3 Week 4 Week 5 Week 6


S.
Roll No Student Name
No
Date: Date: Date: Date: Date: Date:
21.2.25 08.03.25 22.3.25 29.3.25 26.4.25 10.5.25

1 22CS01 ABINAYA.P

2 22CS02 AKILA.B

3 22CS04 ARAVINTH.M

4 22CS05 ARAVINTH.V

5 22CS06 ARULKUMAR.A

6 22CS07 ARULMOZHI.K

7 22CS08 ASIKA.M

8 22CS10 BASKAR.B

9 22CS11 BAVAN.R

10 22CS13 DHIVYADHARSHINI.B

11 22CS15 IHSANULLAH.M

12 22CS16 JAGAN.P

13 22CS17 KAVIYA.R

14 22CS19 LOKESHWARAN.B

15 22CS21 MOHAMED ALI.A

16 22CS22 MUGILAN.M

17 22CS23 MUTHUPANDIYAN.K

18 SUBASH
22CS32
CHANDRABOSE.K
19 22CS33 SUMITHRA.V

20 22CS34 TAMILSELVI S

21 22CS35 VAIDEKI.K

22 22CS37 VEERASEKAR.R

23 22CS40 VIJAYAKUMAR.R

24 23LCS301 KEERTHANA S

25 RAJESHWARI
24RCS42

Department of Computer Science and Engineering

Course Name : JAVA PROGRAMMING Course Code : VACCS0601


Year : III Sem : VI
Mode Of Presentation : BB No Of Hour : 30
Coordinator Name :T. Thendral kani Resource Person Name :C. Selva Ganesan

PROGRAMME PARTICIPANTS / STUDENTS – FEEDBACK(Week-1)

Write: 3 – Very Good,2 - Satisfactory,1 – Unsatisfied


S. Cont Level of Delivery/ Faciliti Any Signatu
Roll No Student Name ent understand Clarity of es other re of
No
ing Speaker Arrang remarks the
ed student
1 22CS01 ABINAYA.P

2 22CS02 AKILA.B

3 22CS04 ARAVINTH.M

4 22CS05 ARAVINTH.V

5 22CS06 ARULKUMAR.A

6 22CS07 ARULMOZHI.K
7 22CS08 ASIKA.M

8 22CS10 BASKAR.B

9 22CS11 BAVAN.R

10 22CS13 DHIVYADHARSHINI.B

11 22CS15 IHSANULLAH.M

12 22CS16 JAGAN.P

13 22CS17 KAVIYA.R

14 22CS19 LOKESHWARAN.B

15 22CS21 MOHAMED ALI.A

16 22CS22 MUGILAN.M

17 22CS23 MUTHUPANDIYAN.K

SUBASH
18 22CS32
CHANDRABOSE.K

19 22CS33 SUMITHRA.V

20 22CS34 TAMILSELVI S

21 22CS35 VAIDEKI.K

22 22CS37 VEERASEKAR.R

23 22CS40 VIJAYAKUMAR.R

24 23LCS301 KEERTHANA S

25 24RCS42 RAJESHWARI

PROGRAMME PARTICIPANTS / STUDENTS – FEEDBACK(Week-2)

S. Roll No Student Name Write: 3 – Very Good,2 - Satisfactory,1 – Unsatisfied


No Cont Level of Delivery/ Faciliti Any Signatu
ent understand Clarity of es other re of
ing Speaker Arrang remarks the
ed student
1 22CS01 ABINAYA.P

2 22CS02 AKILA.B

3 22CS04 ARAVINTH.M

4 22CS05 ARAVINTH.V

5 22CS06 ARULKUMAR.A

6 22CS07 ARULMOZHI.K

7 22CS08 ASIKA.M

8 22CS10 BASKAR.B

9 22CS11 BAVAN.R

10 22CS13 DHIVYADHARSHINI.B

11 22CS15 IHSANULLAH.M

12 22CS16 JAGAN.P

13 22CS17 KAVIYA.R

14 22CS19 LOKESHWARAN.B

15 22CS21 MOHAMED ALI.A

16 22CS22 MUGILAN.M

17 22CS23 MUTHUPANDIYAN.K

SUBASH
18 22CS32
CHANDRABOSE.K

19 22CS33 SUMITHRA.V

20 22CS34 TAMILSELVI S
21 22CS35 VAIDEKI.K

22 22CS37 VEERASEKAR.R

23 22CS40 VIJAYAKUMAR.R

24 23LCS301 KEERTHANA S

25 24RCS42 RAJESHWARI

PROGRAMME PARTICIPANTS / STUDENTS – FEEDBACK(Week-3)

Write: 3 – Very Good,2 - Satisfactory,1 – Unsatisfied


S. Conten Level of Delivery/ Faciliti Any Signatu
Roll No Student Name t understand Clarity of es other re of
No
ing Speaker Arrang remarks the
ed student
1 22CS01 ABINAYA.P

2 22CS02 AKILA.B

3 22CS04 ARAVINTH.M

4 22CS05 ARAVINTH.V

5 22CS06 ARULKUMAR.A

6 22CS07 ARULMOZHI.K

7 22CS08 ASIKA.M

8 22CS10 BASKAR.B

9 22CS11 BAVAN.R

DHIVYADHARSHINI.
10 22CS13
B

11 22CS15 IHSANULLAH.M

12 22CS16 JAGAN.P

13 22CS17 KAVIYA.R
14 22CS19 LOKESHWARAN.B

15 22CS21 MOHAMED ALI.A

16 22CS22 MUGILAN.M

17 22CS23 MUTHUPANDIYAN.K

SUBASH
18 22CS32
CHANDRABOSE.K

19 22CS33 SUMITHRA.V

20 22CS34 TAMILSELVI S

21 22CS35 VAIDEKI.K

22 22CS37 VEERASEKAR.R

23 22CS40 VIJAYAKUMAR.R

24 23LCS301 KEERTHANA S

25 24RCS42 RAJESHWARI
Department of Computer Science and Engineering

Course Name : JAVA PROGRAMMING Course Code : VACCS0601


Year : III Sem : VI
Mode Of Presentation : BB No Of Hour : 30
Coordinator Name : T. Thendral kani Resource Person Name : C. Selva
Ganesan

PROGRAMME PARTICIPANTS / STUDENTS – FEEDBACK(Week-4)


Write: 3 – Very Good,2 - Satisfactory,1 – Unsatisfied
S. Conten Level of Delivery/ Faciliti Any Signatu
Roll No Student Name t understand Clarity of es other re of
No
ing Speaker Arrang remarks the
ed student
1 22CS01 ABINAYA.P

2 22CS02 AKILA.B

3 22CS04 ARAVINTH.M

4 22CS05 ARAVINTH.V

5 22CS06 ARULKUMAR.A

6 22CS07 ARULMOZHI.K

7 22CS08 ASIKA.M

8 22CS10 BASKAR.B

9 22CS11 BAVAN.R

DHIVYADHARSHINI.
10 22CS13
B

11 22CS15 IHSANULLAH.M

12 22CS16 JAGAN.P
13 22CS17 KAVIYA.R

14 22CS19 LOKESHWARAN.B

15 22CS21 MOHAMED ALI.A

16 22CS22 MUGILAN.M

17 22CS23 MUTHUPANDIYAN.K

SUBASH
18 22CS32
CHANDRABOSE.K

19 22CS33 SUMITHRA.V

20 22CS34 TAMILSELVI S

21 22CS35 VAIDEKI.K

22 22CS37 VEERASEKAR.R

23 22CS40 VIJAYAKUMAR.R

24 23LCS301 KEERTHANA S

25 24RCS42 RAJESHWARI

PROGRAMME PARTICIPANTS / STUDENTS – FEEDBACK(Week-5)

Write: 3 – Very Good,2 - Satisfactory,1 – Unsatisfied


S. Cont Level of Delivery/ Faciliti Any Signatu
Roll No Student Name ent understand Clarity of es other re of
No
ing Speaker Arrang remarks the
ed student
1 22CS01 ABINAYA.P

2 22CS02 AKILA.B

3 22CS04 ARAVINTH.M

4 22CS05 ARAVINTH.V

5 22CS06 ARULKUMAR.A
6 22CS07 ARULMOZHI.K

7 22CS08 ASIKA.M

8 22CS10 BASKAR.B

9 22CS11 BAVAN.R

10 22CS13 DHIVYADHARSHINI.B

11 22CS15 IHSANULLAH.M

12 22CS16 JAGAN.P

13 22CS17 KAVIYA.R

14 22CS19 LOKESHWARAN.B

15 22CS21 MOHAMED ALI.A

16 22CS22 MUGILAN.M

17 22CS23 MUTHUPANDIYAN.K

SUBASH
18 22CS32
CHANDRABOSE.K

19 22CS33 SUMITHRA.V

20 22CS34 TAMILSELVI S

21 22CS35 VAIDEKI.K

22 22CS37 VEERASEKAR.R

23 22CS40 VIJAYAKUMAR.R

24 23LCS301 KEERTHANA S

25 24RCS42 RAJESHWARI
PROGRAMME PARTICIPANTS / STUDENTS – FEEDBACK(Week-6)

Write: 3 – Very Good,2 - Satisfactory,1 – Unsatisfied


S. Conte Level of Delivery/ Faciliti Any Signatu
Roll No Student Name nt understand Clarity of es other re of
No
ing Speaker Arrang remarks the
ed student
1 22CS01 ABINAYA.P

2 22CS02 AKILA.B

3 22CS04 ARAVINTH.M

4 22CS05 ARAVINTH.V

5 22CS06 ARULKUMAR.A

6 22CS07 ARULMOZHI.K

7 22CS08 ASIKA.M

8 22CS10 BASKAR.B

9 22CS11 BAVAN.R

DHIVYADHARSHINI.
10 22CS13
B

11 22CS15 IHSANULLAH.M

12 22CS16 JAGAN.P

13 22CS17 KAVIYA.R

14 22CS19 LOKESHWARAN.B

15 22CS21 MOHAMED ALI.A

16 22CS22 MUGILAN.M

17 22CS23 MUTHUPANDIYAN.K

18 22CS32 SUBASH
CHANDRABOSE.K

19 22CS33 SUMITHRA.V

20 22CS34 TAMILSELVI S

21 22CS35 VAIDEKI.K

22 22CS37 VEERASEKAR.R

23 22CS40 VIJAYAKUMAR.R

24 23LCS301 KEERTHANA S

25 24RCS42 RAJESHWARI

Department of Computer Science and Engineering

Course Name : JAVA PROGRAMMING Course Code : VACCS0601


Year : III Sem : VI
Mode Of Presentation : BB No Of Hour : 30 Hours

Course Mark Sheet

S. No Roll No Student Name Marks


(100)
1 22CS01 ABINAYA.P

2 22CS02 AKILA.B

3 22CS04 ARAVINTH.M

4 22CS05 ARAVINTH.V
5 22CS06 ARULKUMAR.A

6 22CS07 ARULMOZHI.K

7 22CS08 ASIKA.M

8 22CS10 BASKAR.B

9 22CS11 BAVAN.R

10 22CS13 DHIVYADHARSHINI.B

11 22CS15 IHSANULLAH.M

12 22CS16 JAGAN.P

13 22CS17 KAVIYA.R

14 22CS19 LOKESHWARAN.B

15 22CS21 MOHAMED ALI.A

16 22CS22 MUGILAN.M

17 22CS23 MUTHUPANDIYAN.K

18 22CS32 SUBASH CHANDRABOSE.K

19 22CS33 SUMITHRA.V

20 22CS34 TAMILSELVI S

21 22CS35 VAIDEKI.K

22 22CS37 VEERASEKAR.R

23 22CS40 VIJAYAKUMAR.R

24 23LCS301 KEERTHANA S

25 24RCS42 RAJESHWARI
Value Added Course : Java Programming
Duration : 30 Hours
Mode : Lectures
Target Audience : CSE

STUDENT NAME LIST& ATTENDANCE

S.
Roll No Student Name Week 1 Week 2 Week 3 Week 4 Week 5
No

1 22CS01 ABINAYA.P

2 22CS02 AKILA.B

3 22CS04
ARAVINTH.M

4 22CS05
ARAVINTH.V

5 22CS06
ARULKUMAR.A

6 22CS07
ARULMOZHI.K

7 22CS08
ASIKA.M

8 22CS10
BASKAR.B

9 22CS11
BAVAN.R

10 22CS13 DHIVYADHARSHINI.B

11 22CS15
IHSANULLAH.M

12 22CS16
JAGAN.P

13 22CS17
KAVIYA.R
14 22CS19
LOKESHWARAN.B

15 22CS21
MOHAMED ALI.A

16 22CS22
MUGILAN.M

17 22CS23 MUTHUPANDIYAN.K

SUBASH
18 22CS32
CHANDRABOSE.K
SUMITHRA.V
19 22CS33

20 22CS34 TAMILSELVI S

21 22CS35 VAIDEKI.K

22 22CS37 VEERASEKAR.R

23 22CS40 VIJAYAKUMAR.R

24 23LCS301 KEERTHANA S

25 RAJESHWARI
24RCS42
Request Mail

Subject: Invitation as Resource Person for Value Added Course on Java Programming - Reg.

Dear Professor

Greetings from Dr. Navalar Nedunchezhiyan College of Engineering.

We are pleased to inform you that the Department of Computer Science and Engineering & Dr. Navalar
Nedunchezhiyan College of Engineering, is organizing a Value Added Course (VAC) on Java
Programming for our students during 30 Hours (21 Feb 2025 to 10 may 2025) every week Saturday, The
course aims to provide participants with practical exposure and in-depth knowledge of Network Simulator.

Considering your expertise and valuable contributions in this field, we would be honored to invite you as a
Resource Person for this course. Your sessions will greatly enrich the learning experience of our students and
help bridge the gap between industry expectations and academic learning.

Details of the Program:

Course Title: Value Added Course on Java Programming .

Duration: [30 hours / (21 feb 2025 to 10 may 2025) 6- days]

Mode: [Offline/Online]

Proposed Dates: [21.02.2025, 08.03.2025, 22.03.2025, 29.03.2025, 26.04.2025, 10.05.2025]

We kindly request your acceptance to be the Resource Person and share your availability. An honorarium and
certificate of appreciation will be provided as a token of gratitude for your contribution.

We look forward to your positive response and guidance in making this initiative a great success.

With warm regards,


T.S. Raja
HoD /CSE
Computer Science and Engineering
Dr. Navalar Nedunchezhiyan College of Engineering
7867083684
nncecse@[Link]
Acceptance Mail

Subject: Acceptance of Invitation as Resource Person – Value Added Course on Java Programming Design-
reg

Dear T.S. Raja

Greetings!

I sincerely thank you and Dr. Navalar Nedunchezhiyan College of Engineering for inviting me to serve as a
Resource Person for the upcoming Value Added Course on Java Programming scheduled Proposed Dates:
[21.02.2025, 08.03.2025, 22.03.2025, 29.03.2025, 26.04.2025, 10.05.2025]. It is indeed an honor and
privilege to be associated with your institution and contribute to this academic initiative.

I am pleased to accept the invitation and confirm my availability for the program. I look forward to interacting
with the students and sharing my knowledge and experiences in the field of Java . Kindly share the detailed
schedule, session duration, and any specific topics you would like me to emphasize, so that I can prepare
accordingly.

Once again, thank you for this opportunity. I look forward to a fruitful engagement.

With warm regards,


Mr. C. Selva Ganesan
Chennai Institute of Technology (Chennai) .
From
Head of the Department
Computer Science and Engineering,
Dr. Navalar Nedunchezhiyan College of Engineering
Tholudur Po,
Cuddalore Dt-606 303.

To
The Principal
Dr. Navalar Nedunchezhiyan College of Engineering
Tholudur Po,
Cuddalore Dt-606 303

Respected Madam

Sub: Request for Conducting a Value Added Course on Java Programming – Reg.

With due respect, I wish to bring to your kind attention that the Department of Computer Science and
Engineering, proposes to organize a Value Added Course (VAC) on the topic “Java Programming ” for the
benefit of our students.

The objective of this course "To develop platform-independent, secure, and object-oriented applications by
using the Java programming language, enabling robust software solutions for web, desktop, mobile, and
enterprise environments”.

We also propose to invite Mr. C. Selva Ganesan as the Resource Person for delivering expert lectures and
hands-on sessions. The course is planned to be conducted during [21.02.2025, 08.03.2025, 22.03.2025,
29.03.2025, 26.04.2025, 10.05.2025] for UG 3rd year students of our department.

In this regard, I kindly request your approval and necessary permission to conduct this Value Added Course at
our institution.

Thank you

Yours faithfully,
T.S. Raja
Head of the Department
Computer Science and Engineering,
Dr. Navalar Nedunchezhiyan College of Engineering
Date:01.04.2025 AN Register Number:

CIRCULAR

Date: 11.02.2025

It is hereby informed that a Value Added Course (VAC) on “Java Programming ” is being organized
by the Department of Computer Science and Engineering (CSE) for the benefit of students. The course will be
conducted from 21.02.2025 to 10.05.2025 with a total duration of 6 weeks.

Resource Person

Mr.C. Selva Ganesan


AP
Chennai Institute of Technology

All students of the department are requested to participate in this Value Added Course and make use
of the opportunity to enhance their knowledge and skills in the field of Java Programming.

Course Coordinator:
T. Thendral Kani
AP/CSE
Dr. Navalar Nedunchezhiyan College of Engineering

Principal
Copy to:
1. All HODs for staff & Students circulation
2. E-Circular I / C
3. Director AGI
4. Hostel warden – LH / BH
5. Event Coordinator
6. NSS& NCC - Coordinator
7. IQAC
8. Physical Director
9. Central Library
10. Transport I/C
11. Office File
12. Notice Board
Copy Submitted to the Director, AGI
CIA-I
Degree / Branch : B.E. Computer Science and Engineering
Java Programming
Course Code / Title : Java Programming Year / Semester : III / VI
Maximum Marks: 80 Hours:2.30 hrs
Answer all the Questions
PART A (10 x 2 = 20 Marks)

[Link] Questions CO BT Level

1 What is the difference between JDK, JRE, and JVM? CO1 BT4

Define class and object in Java. CO1 BT3


2
What is method overloading? CO2 BT4
3
Explain the use of the final keyword. CO1 BT6
4
What are access modifiers in Java? CO1 BT1
5
List any four features of Java. CO2 BT3
6
What is the difference between ==and .equals()? CO2 BT1
7
Define constructor and give its types. CO2 BT3
8
What is the purpose of the this keyword? CO3 BT2
9
What is exception handling? CO3 BT2
10

PART B (5 x 12= 60 Marks)

11.a Develop a Java program to manage a student record system using classes and objects. CO1 BT6

(OR)
11.b Write a Java program to demonstrate multilevel inheritance. CO1 BT3

12.a Create a Java program to handle file operations. CO1 BT2

(OR)
12.b Explain exception handling in Java with a detailed program. CO1 BT1
13.a Write a Java program to implement multiple threads using the Runnable interface CO2 BT2

(OR)

13.b Design a Java application using interfaces and abstract classes.. CO2 BT1

14.a Develop a Java program using Swing or AWT to create a simple calculator GUI. CO2 BT5
(OR)

14.b Explain and implement the concept of collections in Java. CO2 BT5
15.a Create a Java program to demonstrate method overloading and overriding CO3 BT6

(OR)

15.b Write a Java program to simulate a banking application using classes and objects. CO3 BT4

[Link] QUESTION NUMBER CO’S


1 4 CO1
2 8 CO2
3 4 CO3

COURSE OUTCOMES

COs CO1 CO2 CO3 CO4 CO5


Percentage

ALL THE BEST


“Education is the only key to Success..”

Staff In-charge HOD Principal

To be attached:
***Answer script****
Any one student

******Answer key*****

Boucher model will be send Later ***doc***


VAC – JAVA PROGRAMMING ANSWER KEY

What is the difference between JDK, JRE, and JVM?


Ans:
• JDK: Java Development Kit → tools + JRE for development.
1 • JRE: Java Runtime Environment → runs Java programs, includes JVM + libraries.

• JVM: Java Virtual Machine → executes Java bytecode


Define class and object in Java.

Ans :
2
• Class: Blueprint for objects, defines properties & methods.
• Object: Instance of a class with real values

What is method overloading?

Ans :
3
• Method Overloading in Java means defining multiple methods with the same name but different
parameter lists (different number or types of parameters).

Explain the use of the final keyword.

Ans:
4 • final variable: value cannot change.
• final method: cannot be overridden.
• final class: cannot be inherited.

What are access modifiers in Java?

Ans:

5 • public: accessible everywhere.


• protected: accessible within package + subclasses.
• default: accessible within package.
• private: accessible only in same class

List any four features of Java.

Ans:

6 • Platform independent.
• Object-oriented.
• Robust (memory management, exception handling).
• Secure

What is the difference between ==and .equals()?

Ans:
7
• ==: compares references (memory location).
• .equals(): compares object content.

Define constructor and give its types.


8
• Ans:
CO1 BT6

• Constructor: Special method to initialize objects.


• Types: Default constructor, Parameterized constructor, Copy constructor

What is the purpose of the this keyword?

• Refers to the current object of the class.


9 • Used to differentiate instance variables from local variables when they have the same name.
• Can be used to call another constructor in the same class.
• Can be passed as an argument to methods or constructors

What is exception handling?

10 • Exception handling is the process of handling runtime errors in Java using try-catch blocks to prevent
abnormal program termination.
Develop a Java program to manage a student record system using classes and objects.
11.a
Ans:

Classes to define the blueprint of student records (fields and methods) and create objects to store
and manage multiple student details.

Program :

import [Link];

class Student {

int id;

String name;

double marks;

// Constructor

Student(int id, String name, double marks) {

[Link] = id;

[Link] = name;

[Link] = marks;

// Method to display student details

void display() {

[Link]("ID: " + id + ", Name: " + name + ", Marks: " + marks);

public class StudentRecordSystem {

public static void main(String[] args) {

Scanner sc = new Scanner([Link]);

// Taking details for 2 students (can be extended)

Student[] students = new Student[2];

for (int i = 0; i < [Link]; i++) {

[Link]("Enter ID: ");


int id = [Link]();

[Link](); // consume newline

[Link]("Enter Name: ");

String name = [Link]();

[Link]("Enter Marks: ");

double marks = [Link]();

students[i] = new Student(id, name, marks);

[Link]("\n--- Student Records ---");

for (Student s : students) {

[Link]();

[Link]();

Output :

Enter ID: 101

Enter Name: Alice

Enter Marks: 88.5

Enter ID: 102

Enter Name: Bob

Enter Marks: 92.0

--- Student Records ---

ID: 101, Name: Alice, Marks: 88.5

ID: 102, Name: Bob, Marks: 92.0


(OR)
11.b Write a Java program to demonstrate multilevel inheritance. CO1 BT3

Ans:

// Multilevel Inheritance Example


class Person {

String name;

int age;

void setPerson(String name, int age) {

[Link] = name;

[Link] = age;

void displayPerson() {

[Link]("Name: " + name + ", Age: " + age);

class Student extends Person {

int rollNo;

void setStudent(int rollNo) {

[Link] = rollNo;

void displayStudent() {

[Link]("Roll No: " + rollNo);

class Result extends Student {

double marks;

void setResult(double marks) {

[Link] = marks;

void displayResult() {

displayPerson();

displayStudent();

[Link]("Marks: " + marks);

}
}

public class MultilevelInheritanceDemo {

public static void main(String[] args) {

Result r1 = new Result();

[Link]("Alice", 20);

[Link](101);

[Link](89.5);

[Link]("--- Student Result ---");

[Link]();

Output :

--- Student Result ---

Name: Alice, Age: 20

Roll No: 101

Marks: 89.5

12.a Create a Java program to handle file operations. CO1 BT2


Ans:

File handling in Java is done using classes like File, FileWriter, FileReader, BufferedReader.
We can perform operations such as create, write, and read files.

Program:
import [Link].*;

public class FileOperationsDemo {


public static void main(String[] args) {
try {
// 1. Create a file
File file = new File("[Link]");
if ([Link]()) {
[Link]("File created: " + [Link]());
} else {
[Link]("File already exists.");
}

// 2. Write to the file


FileWriter writer = new FileWriter(file);
[Link]("ID: 101, Name: Alice, Marks: 89.5\n");
[Link]("ID: 102, Name: Bob, Marks: 92.0\n");
[Link]();
[Link]("Successfully wrote to the file.");
// 3. Read from the file
BufferedReader reader = new BufferedReader(new FileReader(file));
String line;
[Link]("\n--- File Content ---");
while ((line = [Link]()) != null) {
[Link](line);
}
[Link]();

} catch (IOException e) {
[Link]("An error occurred.");
[Link]();
}
}
}

Output:
File created: [Link]
Successfully wrote to the file.

--- File Content ---


ID: 101, Name: Alice, Marks: 89.5
ID: 102, Name: Bob, Marks: 92.0
(OR)
12.b Explain exception handling in Java with a detailed program. CO1 BT1
Ans :

What it is: A mechanism to handle runtime errors so the program can continue or fail gracefully.
Hierarchy (simplified): Throwable → Exception (recoverable) & Error (generally
unrecoverable).
Common runtime (unchecked) exceptions extend RuntimeException (e.g.,
NullPointerException, NumberFormatException); checked exceptions (e.g., IOException) must
be declared/handled.
Keywords:
try (guard code) • catch (handle specific exceptions) • finally (always runs) • throw (create/raise
an exception) • throws (declare that a method may throw).
Patterns & tips:
Catch specific exceptions first, use finally for cleanup, create custom exceptions for business
rules, and prefer try-with-resources for auto-closing I/O.
import [Link].*;

// 1) Custom checked exception for a business rule


class InsufficientFundsException extends Exception {
public InsufficientFundsException(double balance, double amount) {
super("Insufficient funds: tried to withdraw " + amount + " with balance " + balance);
}
}

// 2) Simple domain class


class BankAccount {
private double balance;

public BankAccount(double initial) {


if (initial < 0) throw new IllegalArgumentException("Initial balance cannot be negative");
[Link] = initial;
}

public double getBalance() { return balance; }


public void deposit(double amount) {
if (amount <= 0) throw new IllegalArgumentException("Deposit must be positive");
balance += amount;
}

// Declares a checked exception via 'throws'


public void withdraw(double amount) throws InsufficientFundsException {
if (amount <= 0) throw new IllegalArgumentException("Withdrawal must be positive");
if (amount > balance) throw new InsufficientFundsException(balance, amount);
balance -= amount;
}
}

public class ExceptionHandlingDemo {

// 3) try-with-resources: auto-closes the reader; may throw IOException (checked)


static double readInitialBalance(String path) throws IOException {
try (BufferedReader br = new BufferedReader(new FileReader(path))) {
String line = [Link](); // could be null or non-numeric
return [Link](line); // may throw NumberFormatException (unchecked)
}
}

// Helper for parsing; shows an unchecked exception scenario


static double parseAmount(String text) {
return [Link](text); // throws NumberFormatException if text is not numeric
}

public static void main(String[] args) {


double initial;

// A) Handle CHECKED exception (IOException) from file I/O


try {
initial = readInitialBalance("[Link]"); // Place a number like 1000.0 in this file to
test
[Link]("Loaded initial balance from file: " + initial);
} catch (IOException e) {
[Link]("Could not read balance file: " + [Link]());
// graceful fallback
initial = 500.0;
[Link]("Using default initial balance: " + initial);
} catch (NumberFormatException e) {
// If the file exists but contains non-numeric content
[Link]("Balance file contains invalid number: " + [Link]());
initial = 500.0;
}

BankAccount account = new BankAccount(initial);

// B) Handle CUSTOM CHECKED exception from a business rule


try {
double toWithdraw = parseAmount("250.75");
[Link](toWithdraw);
[Link]("Withdrew " + toWithdraw + ", new balance: " +
[Link]());
} catch (InsufficientFundsException e) {
[Link]("Business rule violation: " + [Link]());
} catch (IllegalArgumentException e) {
// from validation in withdraw
[Link]("Invalid operation: " + [Link]());
} finally {
[Link]("[FINALLY #1] Audit snapshot balance: " + [Link]());
}

// C) Handle UNCHECKED exception (NumberFormatException) from bad input


try {
String userInput = "xyz"; // intentionally bad to trigger NumberFormatException
double amount = parseAmount(userInput); // will throw
[Link](amount);
[Link]("Deposited " + amount + ", new balance: " + [Link]());
} catch (NumberFormatException e) {
[Link]("Input error: amount must be numeric. Details: " + [Link]());
} finally {
[Link]("[FINALLY #2] Audit snapshot balance: " + [Link]());
}

// D) Demonstrate 'throw' explicitly (rethrowing after wrapping)


try {
riskyBusiness(account);
} catch (InsufficientFundsException e) {
[Link]("Caught from riskyBusiness: " + [Link]());
} finally {
[Link]("[FINALLY #3] Final balance: " + [Link]());
}

[Link]("Program completed normally.");


}

// Method that both throws (declares) and uses a try/catch internally


static void riskyBusiness(BankAccount acc) throws InsufficientFundsException {
try {
[Link](1000); // may throw custom checked exception
} catch (IllegalArgumentException e) {
// Wrap and rethrow as a checked business exception
throw new InsufficientFundsException([Link](), 1000);
}
}
}
13.a Write a Java program to implement multiple threads using the Runnable interface. CO2 BT2
Ans:
// Multiple threads using Runnable interface

class Task implements Runnable {


private String taskName;

Task(String name) {
[Link] = name;
}

@Override
public void run() {
for (int i = 1; i <= 5; i++) {
[Link](taskName + " - Count: " + i);
try {
[Link](500); // pause for half a second
} catch (InterruptedException e) {
[Link](taskName + " interrupted.");
}
}
[Link](taskName + " finished execution.");
}
}

public class MultiThreadDemo {


public static void main(String[] args) {
// Create Runnable objects
Task t1 = new Task("Thread-1");
Task t2 = new Task("Thread-2");
Task t3 = new Task("Thread-3");

// Wrap Runnable in Thread objects


Thread thread1 = new Thread(t1);
Thread thread2 = new Thread(t2);
Thread thread3 = new Thread(t3);

// Start the threads


[Link]();
[Link]();
[Link]();
}
}
(OR)

13.b Design a Java application using interfaces and abstract classes. CO2 BT1
Ans:
An abstract class provides partial implementation (some methods defined, some abstract).

An interface defines only abstract methods (Java 8+ allows default and static methods too).

A Java application can combine both to achieve abstraction, modularity, and multiple
inheritance.
// Interface
interface Payable {
double calculatePay(); // abstract method
}

// Abstract class
abstract class Employee implements Payable {
String name;
int id;

Employee(String name, int id) {


[Link] = name;
[Link] = id;
}

// Concrete method
void displayInfo() {
[Link]("Employee ID: " + id + ", Name: " + name);
}

// Abstract method
abstract String getRole();
}

// Concrete subclass 1
class FullTimeEmployee extends Employee {
double salary;

FullTimeEmployee(String name, int id, double salary) {


super(name, id);
[Link] = salary;
}

@Override
public double calculatePay() {
return salary; // fixed salary
}

@Override
String getRole() {
return "Full-Time Employee";
}
}

// Concrete subclass 2
class PartTimeEmployee extends Employee {
int hoursWorked;
double hourlyRate;

PartTimeEmployee(String name, int id, int hoursWorked, double hourlyRate) {


super(name, id);
[Link] = hoursWorked;
[Link] = hourlyRate;
}

@Override
public double calculatePay() {
return hoursWorked * hourlyRate;
}

@Override
String getRole() {
return "Part-Time Employee";
}
}

// Main class
public class EmployeeApp {
public static void main(String[] args) {
Employee e1 = new FullTimeEmployee("Alice", 101, 50000);
Employee e2 = new PartTimeEmployee("Bob", 102, 20, 500);

[Link]();
[Link]("Role: " + [Link]() + ", Pay: " + [Link]());

[Link]();

[Link]();
[Link]("Role: " + [Link]() + ", Pay: " + [Link]());
}
}
Output:
Employee ID: 101, Name: Alice
Role: Full-Time Employee, Pay: 50000.0

Employee ID: 102, Name: Bob


Role: Part-Time Employee, Pay: 10000.0
14.a Develop a Java program using Swing or AWT to create a simple calculator GUI. CO2 BT5
Ans :
import [Link].*;
import [Link].*;
import [Link].*;

public class CalculatorApp extends JFrame implements ActionListener {


JTextField input1, input2, result;
JButton addBtn, subBtn, mulBtn, divBtn, clearBtn;

public CalculatorApp() {
// Frame settings
setTitle("Simple Calculator");
setSize(400, 250);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setLayout(new GridLayout(5, 2, 10, 10));

// Components
input1 = new JTextField();
input2 = new JTextField();
result = new JTextField();
[Link](false);

addBtn = new JButton("Add");


subBtn = new JButton("Subtract");
mulBtn = new JButton("Multiply");
divBtn = new JButton("Divide");
clearBtn = new JButton("Clear");

// Add action listeners


[Link](this);
[Link](this);
[Link](this);
[Link](this);
[Link](this);

// Add components to frame


add(new JLabel("Enter First Number:"));
add(input1);
add(new JLabel("Enter Second Number:"));
add(input2);
add(new JLabel("Result:"));
add(result);
add(addBtn);
add(subBtn);
add(mulBtn);
add(divBtn);
add(clearBtn);

setVisible(true);
}
@Override
public void actionPerformed(ActionEvent e) {
try {
double num1 = [Link]([Link]());
double num2 = [Link]([Link]());
double res = 0;

if ([Link]() == addBtn) {
res = num1 + num2;
} else if ([Link]() == subBtn) {
res = num1 - num2;
} else if ([Link]() == mulBtn) {
res = num1 * num2;
} else if ([Link]() == divBtn) {
if (num2 == 0) {
[Link](this, "Cannot divide by zero!");
return;
}
res = num1 / num2;
} else if ([Link]() == clearBtn) {
[Link]("");
[Link]("");
[Link]("");
return;
}

[Link]([Link](res));

} catch (NumberFormatException ex) {


[Link](this, "Please enter valid numbers!");
}
}

public static void main(String[] args) {


new CalculatorApp();
}
}
(OR)

14.b Explain and implement the concept of collections in Java. CO2 BT5
Ans:
The Java Collections Framework (JCF) is a set of classes and interfaces that implement
commonly used data structures like List, Set, Map, Queue.
Located in [Link] package.
Provides features like dynamic sizing, searching, sorting, iteration.
Key interfaces:
List → ordered collection, allows duplicates (e.g., ArrayList, LinkedList).
Set → unique elements, no duplicates (e.g., HashSet, TreeSet).
Map → key-value pairs (e.g., HashMap, TreeMap).
Advantages: reduces programming effort, improves performance, reusable, supports algorithms
(sort, shuffle).

import [Link].*;

public class CollectionsDemo {


public static void main(String[] args) {
// 1. List Example (Allows duplicates, maintains order)
List<String> fruits = new ArrayList<>();
[Link]("Apple");
[Link]("Banana");
[Link]("Orange");
[Link]("Apple"); // duplicate allowed
[Link]("List: " + fruits);

// 2. Set Example (No duplicates, unordered)


Set<String> uniqueFruits = new HashSet<>(fruits);
[Link]("Set (Unique elements): " + uniqueFruits);

// 3. Map Example (Key-Value pairs)


Map<Integer, String> studentMap = new HashMap<>();
[Link](101, "Alice");
[Link](102, "Bob");
[Link](103, "Charlie");

[Link]("Map (Student Records): " + studentMap);

// Traversing List
[Link]("\nTraversing List:");
for (String f : fruits) {
[Link](f);
}

// Traversing Map
[Link]("\nTraversing Map:");
for ([Link]<Integer, String> entry : [Link]()) {
[Link]("ID: " + [Link]() + ", Name: " + [Link]());
}
}
}

Output:
List: [Apple, Banana, Orange, Apple]
Set (Unique elements): [Banana, Orange, Apple]
Map (Student Records): {101=Alice, 102=Bob, 103=Charlie}

Traversing List:
Apple
Banana
Orange
Apple

Traversing Map:
ID: 101, Name: Alice
ID: 102, Name: Bob
ID: 103, Name: Charlie
15.a Create a Java program to demonstrate method overloading and overriding. CO3 BT6
Ans:
Method Overloading: Same method name but different parameter lists (compile-time
polymorphism).

Method Overriding: Subclass provides a specific implementation of a method already defined in


the parent class (runtime polymorphism).
// Demonstrating Method Overloading and Overriding

class MathUtil {
// Method Overloading (same name, different parameters)
int add(int a, int b) {
return a + b;
}

double add(double a, double b) {


return a + b;
}
}

// Parent class
class Animal {
void sound() {
[Link]("Animal makes a sound");
}
}

// Child class overriding method


class Dog extends Animal {
@Override
void sound() {
[Link]("Dog barks");
}
}

public class OverloadOverrideDemo {


public static void main(String[] args) {
// Method Overloading
MathUtil util = new MathUtil();
[Link]("Sum of integers: " + [Link](5, 10));
[Link]("Sum of doubles: " + [Link](3.5, 2.5));

[Link]();

// Method Overriding
Animal a = new Animal();
Animal d = new Dog(); // Runtime polymorphism

[Link](); // Calls parent method


[Link](); // Calls overridden method in Dog
}
}
Output :
Sum of integers: 15
Sum of doubles: 6.0

Animal makes a sound


Dog barks
(OR)

15.b Write a Java program to simulate a banking application using classes and objects. CO3 BT4
Ans:
import [Link];

class BankAccount {
private String accountHolder;
private int accountNumber;
private double balance;
// Constructor
BankAccount(String accountHolder, int accountNumber, double balance) {
[Link] = accountHolder;
[Link] = accountNumber;
[Link] = balance;
}

// Deposit method
void deposit(double amount) {
if (amount > 0) {
balance += amount;
[Link]("Deposited: " + amount);
} else {
[Link]("Invalid deposit amount.");
}
}

// Withdraw method
void withdraw(double amount) {
if (amount > 0 && amount <= balance) {
balance -= amount;
[Link]("Withdrawn: " + amount);
} else {
[Link]("Insufficient balance or invalid amount.");
}
}

// Check balance method


void checkBalance() {
[Link]("Account Holder: " + accountHolder);
[Link]("Account Number: " + accountNumber);
[Link]("Current Balance: " + balance);
}
}

public class BankingApp {


public static void main(String[] args) {
Scanner sc = new Scanner([Link]);

// Create a sample bank account


BankAccount account = new BankAccount("Alice", 101, 1000);

while (true) {
[Link]("\n--- Banking Menu ---");
[Link]("1. Deposit");
[Link]("2. Withdraw");
[Link]("3. Check Balance");
[Link]("4. Exit");
[Link]("Enter choice: ");
int choice = [Link]();

switch (choice) {
case 1:
[Link]("Enter amount to deposit: ");
double dep = [Link]();
[Link](dep);
break;
case 2:
[Link]("Enter amount to withdraw: ");
double wd = [Link]();
[Link](wd);
break;
case 3:
[Link]();
break;
case 4:
[Link]("Thank you for using Banking App!");
[Link]();
return;
default:
[Link]("Invalid choice.");
}
}
}
}

Output:
--- Banking Menu ---
1. Deposit
2. Withdraw
3. Check Balance
4. Exit
Enter choice: 1
Enter amount to deposit: 500
Deposited: 500.0

--- Banking Menu ---


1. Deposit
2. Withdraw
3. Check Balance
4. Exit
Enter choice: 2
Enter amount to withdraw: 200
Withdrawn: 200.0

--- Banking Menu ---


1. Deposit
2. Withdraw
3. Check Balance
4. Exit
Enter choice: 3
Account Holder: Alice
Account Number: 101
Current Balance: 1300.0

You might also like