BITM JAVA Programming – I
bitmsemester 3
JAVA Programming – I
Subject Code: IT216
Course Title: JAVA Programming – I
Course No: IT216
Nature of Course: Theory & Practical
Full Marks: 60 + 40
Pass Marks: 30 + 20
Credit Hours: 3
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
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 Contents
| Course Contents | Teaching Methodology | Teaching Hours |
|---|---|---|
| Unit 1: Java's Lineage (2 Hrs.) | ||
| The Creation of Java | Lecture/Lab | |
| 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 (2 Hrs.) | ||
| Object-Oriented Programming (Two Paradigms, Abstraction, The Three OOP Principles) | Lecture/Lab | |
| Lexical Issues (Whitespace, Identifiers, Literals, Comments, Separators, The Java Keywords) | ||
| Unit 3: Data types, Variables and Arrays (4 Hrs.) | ||
| Java is a strongly Typed Language | Lecture/Lab | |
| 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 (4 Hrs.) | ||
| Arithmetic Operators: +,-,/,*,%,++,-- | Lecture/Lab | |
| 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 (5 Hrs.) | ||
| Java' Selection statements: If…., switch…., Iteration statements: while, do-while, for, the for-each version of the for loop, nested loops | Lecture/Lab | |
| Jump statements: using break, using continue | ||
| Unit 6: Introducing Classes (4 Hrs.) | ||
| Class fundamentals: The general form of a class, a simple class | Lecture/Lab | |
| 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 (4 Hrs.) | ||
| Overloading methods; overloading constructors | Lecture/Lab | |
| 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 (3 Hrs.) | ||
| Inheritance Basics: Member access and inheritance, | Lecture/Lab | |
| 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 | ||
| Unit 9: Packages and Interface (3 Hrs.) | ||
| Packages: defining a package, finding packages and CLASSPATH | Lecture/Lab | |
| Access Protection | ||
| Interfaces: defining an interface, implementing interfaces, nested interfaces, applying interfaces, variables in interfaces, interfaces can be extended | ||
| Unit 10: Exception handling (3 Hrs.) | ||
| Exception-handling fundamentals, exception types, uncaught exceptions, using try..catch | Lecture/Lab | |
| Multiple catch clauses | ||
| Nested try statements | ||
| Throw, throws, finally, Java's built – in exception | ||
| Creating your own exception subclasses | ||
| Unit 11: Multithreaded programming (4 Hrs.) | ||
| The Java Thread Model | Lecture/Lab | |
| 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 (3 Hrs.) | ||
| Enumerations: Fundamentals, the values() and valueOf() methods, Java Enumerations Are class types, enumerations inherit Enum; Type Wrappers: character, Boolean, the numeric type wrappers | Lecture/Lab | |
| 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 (3 Hrs.) | ||
| The String constructors, string length, | Lecture/Lab | |
| 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() | ||
| Unit 14: Input/output (4 Hrs.) | ||
| File: directories, using filenameFilter, the listFiles(), creating directories | Lecture/Lab | |
| 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 |
Text Books
1. Thinking in JAVA- Bruce Fikal
2. Complete reference for JAVA 2
3. Schaum's outline programming in C++- John Hubbard
