Marwadi University Faculty of Diploma Studies Information and Communication Technology
Marwadi University Faculty of Diploma Studies Information and Communication Technology
Objectives:
1. To gain knowledge about basic Java language syntax and semantics to write Java programs and
use concepts such as variables, conditional and iterative execution methods etc.
2. To understand the fundamentals of object-oriented programming in Java, including defining
classes, objects, invoking methods etc and exception handling mechanisms
3. To understand the principles of inheritance, packages and interfaces
4. To understand Multithreading and I/O files in Java
5. To understand the fundamental of AWT and SWING
Course Outcomes: After completion of this course, student will be able to:
1. List and use Object Oriented Programming concepts for problem solving
2. Write Java application programs using OOP principles and proper program structuring
3. Produce design stability for various applications- by applying exception handling and
inheritance
4. Relate inheritance, package and interfaces in the applications of Java
5. Connect multithreading approach to reduce the wastage of CPU time
6. Create GUI based window with user based input and numerical calculations.
7. Use I/O files for designing applications using Java
Contents:
Contact
Unit Topics Hours
Introduction to object-oriented programming
Object oriented paradigm, object and classes, data abstraction and encapsulation, 6
1 inheritance, polymorphism, dynamic binding, benefits and application of OOP.
Java evaluation and overview
Java evaluation: Java History, Java features, difference with other language, java
with internet, www and web browsers, Java environment, JDK Java overview: Java 4
2 program structure, java program implementation on various IDE’s like NetBeans
and Eclipse, Byte Code and JVM.
Strings
String class, String Buffer class, Operations on string, Command line argument, 4
3 Use of Wrapper Class.
Object, Classes and Methods
Introduction to class, objects, members data and member functions, declaration of
fields and methods, accessing class members, constructors and destructors, method
14
overloading, static members, Inheritance, method overriding, final variable, final
4 member, final class, finalizer methods, Abstract method and class, Visibility
modifiers in classes.
Interfaces (Multiple Inheritance)
Introduction to interface, declaration of interface, extending interface, 10
5 implementing interface, accessing interface variables.
Java Packages
Introduction and declaration of Packages in Java, creating and accessing package, 6
6 adding class to a package, static import.
Errors and Exception Handling in Java
Types of Errors, Exceptions, syntax of exception handling code, single and multiple 8
7 catch statements.
Multithreaded Programming
Introduction to thread, Creating and Extending thread class, stopping and blocking
12
thread class, Life cycle of thread, thread exception, thread priority, Synchronization,
8 implementing “Runnable” interface.
Managing I/O file in Java
9 Concept of Stream and Stream classes, Byte Stream, Input/output Stream,
Characters Stream, Reader Stream, Writer Stream, File Class, File Input Stream, 8
File Output Stream.
Marwadi University
Faculty of Diploma studies
Information and Communication Technology
GUI
10 Comparing AWT and swing features, AWT Components, Overview of the AWT 12
components, Component properties, Graphics context, Containers, Container class
Total 84 Hrs
Additional Experiments:
1. Write a Java program that prints all real solutions to the quadratic equation ax 2 +bx+c = 0. Read
in a, b, c and use the quadratic formula. If the discriminate b2 -4ac is negative, display a message
stating that there are no real solutions?
2. The Fibonacci sequence is defined by the following rule. The first 2 values in the sequence are 1,
1. Every subsequent value is the sum of the 2 values preceding it. Write a Java program that uses
both recursive and non-recursive functions to print the nth value of the Fibonacci sequence?
3. Write a Java program that prompts the user for an integer and then prints out all the prime numbers
up to that Integer?
4. Write a Java program that checks whether a given string is a palindrome or not. Ex: MADAM is a
palindrome?
5. Write a Java program for sorting a given list of names in ascending order?
Marwadi University
Faculty of Diploma studies
Information and Communication Technology
6. Write a Java program to multiply two given matrices?
7. Write a Java program that reads a line of integers and then displays each integer and the sum of all
integers. (use StringTokenizer class)?
8. Write a Java program that reads on file name from the user, then displays information about
whether the file exists, whether the file is readable, whether the file is writable, the type of file and
the length of the file in bytes?
9. Write a Java program that reads a file and displays the file on the screen, with a line number before
each line?
10. Write a Java program that displays the number of characters, lines and words in a text.
Supplementary Resources:
1. https://ocw.mit.edu/courses/electrical...and.../6...programming.../lecture-14/
2. https://beginnersbook.com/2013/04/oops-concepts/
3. www.oracle.com/technetwork/java/oo-140949.html
4. nptel.ac.in/courses/106106147/3