JAVA Programming – I Syllabus - BIM (TU)

  • Short Name N/A
  • Course code IT 216
  • Semester Third Semester
  • Full Marks 100
  • Pass Marks 45
  • Credit Hrs 3
  • Elective/Compulsary Compulsary

JAVA Programming – I

Chapter wise complete Notes.

Course Description

Course Objective

This course aims to develop students' skill in JAVA programming. Students are expected to have the basic knowledge of programming with 'C' language. This course should be associated with laboratory experiments to augment the concepts taught in the class.

Course Description:

Java’s Lineage, An overview of Java, Data types, Variables and Arrays, Operators, Control Statements, Introducing Classes, A Closer Look at Methods and classes, Inheritance, Packages and Interface, Exception handling, Multithreaded programming, Enumerations, autoboxing, and annotations, String handling, Input/output

Unit Contents

Course Details

Unit 1 : Java’s Lineage                                                                                           2hrs

  • The Creation of Java
  • How Java Changed the Internet
  • The Bytecode
  • Servlets: Java on the Server Side
    • Simple
    • Object-oriented
    • Robust
    • Multithreaded
    • Architecture Neutra
    • Interpreted and High Performance
    • Distributed
    • Dynamic

Unit 2 : An overview of Java                                       2hrs

  • Object-Oriented Programming
    • Two Paradigms
    • Abstraction
    • The Three OOP Principles
  • Lexical Issues
    • Whitespace
    • Identifiers
    • Literals
    • Comments
    • Separators
    • The Java Keywords

Unit 3 : Data types, Variables and Arrays                       LH4

  • Java is a strongly Typed Language
  • The Primitive Types
  • Integers
    • Bye, short, int, long
  • Floating point Types
    • Float, double
  • Characters
  • Booleans
  • A closer Look at Literals
    • Integer Literals, Floating-Point literals, Boolean Literals, Character Literals, String Literals
    • Variables:
      • Declaring a Variable, Dynamic Initialization, The Scope and Lifetime of Variables
      • Type conversions and Casting, Casting Incompatible types
    • Automatic Type promotion Rules
    • Arrays
      • One Dimensional Arrays, Multidimensional arrays, Alternative Array Declaration syntax
    • Scanner Object

Unit 4 : Operators                                                          LH4

  • Arithmetic Operators: +,-,/,*,%,++,--
  • The Bitwise operators:
    • The bitwise logical operators
    • The left shift, right shift, Unsigned Right shift, bitwise operator compound assignments
  • Relational operators
  • Boolean logical operators
    • Short-circuit logical operators
    • The ? operator
    • Operator precedence
    • Using parenthesis

Unit 5 : Control Statements                                             LH5

  • Java’ Selection statements
    • If…., switch….,
    • Iteration statements: while, do-while, for, the for-each version of the for loop, nested loops
  • Jump statements: using break, using continue

After the completion of above five units, programs like following should be developed:

  • Multiple choice problems
  • Working on sequence of values (calculating average, mean, mode )

Unit 6 : Introducing Classes                                     LH4

  • Class fundamentals
    • The general form of a class, a simple class
  • Declaring objects
  • Assigning Object Reference variables
  • Introducing methods
    • Adding a method to the box class, returning a value, adding a method that takes parameters
  • Constructors: Parameterized Constructors
  • The this keyword: instance variable hiding
  • Garbage collection
  • The finalized() method
  • A Stack class

 

Unit 7 : A Closer Look at Methods and classes                LH4

  • Overloading methods; overloading constructors
  • Using objects as parameters
  • A closer look at arguments passing, returning objects, recursion, introducing access control, understanding static, introducing final, arrays revisited, introducing nested and inner classes, exploring the string class, using command-line arguments
  • Varargs: variable-length arguments; overloading vararg methods, varargs and ambiguity

Unit 8 : Inheritance                                                             LH3

  • Inheritance Basics: Member access and inheritance,
  • Using super: using super to call superclass constructors, a second use for super
  • Creating a multilevel hierarchy
  • When constructors are called
  • Method overriding
  • Dynamic method dispatch: why overridden method?
  • Using abstract classes, using final with inheritance
  • The object class

After completion of above three units following programs should be developed:

  • Program that work on group of similar objects like, generating average age of employees, displaying maximum salary of employees, displaying names of persons with same address

 

Unit 9 : Packages and Interface                                       3hrs

  • Packages: defining a package, finding packages and CLASSPATH
  • Access Protection
  • Interfaces: defining an interface, implementing interfaces, nested interfaces, applying interfaces, variables in interfaces, interfaces can be extended

Unit 10 : Exception handling                                               LH3

  • Exception-handling fundamentals, exception types, uncaught exceptions, using .catch
  • Multiple catch clauses
  • Nested try statements
  • Throw, throws, finally, Java’s built –in exception
  • Creating your own exception subclasses

Unit 11 : Multithreaded programming                             LH4

  • The Java Thread Model
  • Thread priorities, synchronization, messaging, the thread class and the runnable interface
  • The main thread
  • Creating a thread: implementing runnable, extending thread
  • Creating multiple threads: using isAlive() and join()
  • Thread priorities
  • Synchronization: using synchronized methods, the synchronized statement

Unit 12 : Enumerations, autoboxing, and annotations             LH 3

  • Enumerations
    • Fundamentals, the values() and valueOf() methods, Java Enumerations Are class types, enumerations inherit Enum
    • Type Wrappers: character, Boolean, the numeric type wrappers
  • Autoboxing
    • Autoboxing and methods, autoboxing/unboxing occurs in expressions, autoboxing/unboxing Boolean and character values, autoboxing/unboxing helps prevent errors
  • Annotations
    • Annotation basics, specifying a retention policy, obtaining annotations at run time by use of reflection

Unit 13 : String handling                                                          LH3

  • The String constructors, string length,
  • Special string operators: string literals, concatenation, conversion and toString()
  • Character Extraction
    • charAt(), getChars(), getBytes(), toCharArray()
    • String comparison: equals() and equalsIgnoreCase(), regionMatches(), startsWith() and endsWith(), equals() versus ==, compareTo
  • Modifying a String
    • Substring(), concat(), replace(), trim()

After completion of above two units programs like following should be developed:

  • Efficient codes with minimum code redundancy
  • Program capable of handling errors on own instead of terminating programs abnormally

 

Unit 14 : Input/output:                                                   LH4

  • File: directories, using filenameFilter, the listFiles(), creating directories
  • The Autocloseable, Closeable, and Flushable Interfaces
  • I/O Exceptions
  • The stream classes
  • The byte Streams: InputStream, OutputStream, FileInputStream, FileOutputStream,

PrintStream, DataOutputStream and DataInputStream, RandomAccessFile

  • The Character Streams:
  • Reader, Writer, FileReader, FileWriter, PrintWriter
  • The Console Class
  • Serialization: Serializable, Externalizable, ObjectOutput, ObjectOutputStream ObjectInput, ObjectInputStream

After completion of this unit, program which record keeping capability with searching, manipulating features should be developed.

Text and Reference Books
Top