Fall 2021: Advanced Programming in Java

From MKWiki
Jump to navigation Jump to search

Logistics

  • Class Timings: Fridays 1:00 pm - 3:00 pm (5th and 6th slot)
  • Classroom: Online
  • Lab Timings: Thursdays 1:00 pm - 5:00 pm (5th - 8thslot)

Course Overview

Lectures

Lecture Topic Lecture Slides Readings
Unit 1: Lecture 00 (Last Semester)
(1) Introduction: History of Java, Java Features, First Sample Program, Java Virtual Machine(JVM) Architecture.

(2) OOPs Principles: Object, Class, Encapsulation, Abstraction, Inheritance, Polymorphism.
(3) Data Types, Variables, Arrays, Operators, Control Statements: The Primitive Data Types(Integers, Floating-Point Types, Characters, Booleans). Variables and their scope and lifetime. Type Conversion and Casting. Arrays (One-dimensional Arrays, Multidimensional Arrays) declaration, initialization, and usage. Operators (Arithmetic, Increment and Decrement, The Bitwise Operators, Compound Assignments, Relational Operators, Ternary Operator, Operator Precedence). Control Statements (Selection Statements-if, switch, Interation Statements - for, while, and do-while. The Enhanced For Loop (For-Each Loop). Jump Statements (break, continue, return).
(4) Introducing Classes: Class Fundamentals, Declaring Objects, Introducing Methods, Constructors(Default, No-argument, Parameterized), The this keyword, Garbage Collection, The finalize( ) Method.

(5) A Closer Look at Methods and Classes: Overloading Methods, Automatic Type Conversions in Method Overloading. Overloading Constructors. Using Objects as Parameters. Copy Constructor. A Closer Look at Argument Passing(Call-by-Value, Call-by-Reference). Returning Objects. Recursion (Base Condition, Progressive Approach). Introducing Access Control (public, private, protected, default (package-private)). Understanding Static(static variable, methods, and blocks). Introducing Final. Nested and Inner Classes (how to define and use an inner class). Exploring the String Class. Using Command-Line Argument. Varargs: Variable-Length Arguments(self-study)
0.1.pdf 0.2.pdf0.3.pdf 0.4.pdf 0.5.pdf Chapter 1 -7 (R1)
Unit 1: Lecture 01 (22/07/21, 23/07/21)
Inheritance: Inheritance Basics. Types of Inheritance in Java. A simple example of Inheritance(Single Inheritance). Member access and Inheritance, A more practical example. A Superclass Variable Can Reference a Subclass Object. Using super. Using Super to Call Superclass Constructors. Creating a Multilevel Hierarchy. When Constructors are Executed? Method Overriding. Method Overriding vs Overloading. Dynamic Method Dispatch. Why Overridden Methods? Applying Method Overriding. Using Abstract Classes. Using final with Inheritance. Using final to Prevent Overriding. The Object Class.
1.pdf Chapter 8 (R1)
Unit 2-3: Lecture 02 (30/07/21, 06/08/21, 27/08/21, 03/09/2021)
Packages and Interfaces: Introduction to Packages. Defining a Package. Package Example. Finding Packages and CLASSPATH. Access Protection. An Access Example. Importing Packages. Introduction to Interfaces. Defining an Interface. Implementing Interfaces. Accessing Implementations Through Interface References. Partial Implementations. Nested Interfaces. Applying Interfaces. Variables in Interfaces. Extending Interfaces. Default Interface Methods. Multiple Inheritance Issues. static Methods in an Interface.
2.pdf Chapter 9 (R1)
Unit 4: Lecture 03 (10/09/21, 17/09/21, 01/10/21)
Exception Handling: Exception Handling Fundamentals(five keywords:try, catch, throw, throws, finally). Exception Types. Uncaught Exception.Using try and catch. Displaying a Description of an Exception. Multiple catch Clauses. Nested try Statements. throw. throws. throw vs. throws. finally. final vs. finally vs. finalize. Java’s Built-in Exceptions. Hierarchy of Java Exception Classes. Creating your own Exception Subclass
3.pdf Chapter 10 (R1)
Unit 5: Lecture 04 (08/10/21, 15/11/21 )
Java I/O and File Handling: I/O Stream Basics, Byte Stream and Character Stream, The Predefined Stream, Reading Console Input, Writing Console Output, Reading and Writing Files, Try-with Resources [ Self Study ]
4.pdf Chapter 13 (R1)
Unit 6: Lecture 05 (22/10/21, 29/10/21, 12/11/21 )
Event Handling, Introducing the AWT: Working with Windows, Graphics and Text, Using AWT Controls, Layout Managers, and Menus: The AWT class hierarchy. The Delegation Event Model. Events, Event sources, Event classes, Event Listeners, Relationship between Event sources and Listeners. Creating GUI applications using AWT.
5.pdf + Book Reading + Online Tutorials. Chapter 24, 25, 26 (R1)

Assignments and Tests

  • Assignment No. 1(a), Prepare 10 important questions from Lecture 1. It should reflect your understanding of the topic. Avoid discussing with your friends. It may reduce your score if similarities are found. [17/09/2021]
  • Assignment No. 1(b), Answer the questions prepared in 1(a). [17/09/2021]
  • Assignment No. 1(c), Prepare 10 important questions from Lecture 2. It should reflect your understanding of the topic. Avoid discussing with your friends. It may reduce your score if similarities are found. [17/09/2021]
  • Assignment No. 1(d), Answer the questions prepared in 1(c). [17/09/2021]
  • Assignment No. 1(e), Generate 10 errors from the Lecture 2 ppt sample programs. The errors should be related to the concepts of inheritance, packages, and interfaces. [17/09/2021]
  • Assignment No. 1, Submission Deadline: 28/09/2021

Resources

  • R1: Schildt, H. (2018). Java: The Complete Reference. 10th edition. McGraw-Hill Education.
  • Additional R1: Balaguruswamy, E. (2014). Programming with JAVA: A Primer. 5th edition. India: McGraw Hill Education.
  • Additional R2: Horstmann, C. S. (2017). Core Java - Vol. I – Fundamentals (Vol. 10). Pearson Education.
  • Additional R3: Schildt, H., & Skrien, D. (2012). Java Fundamentals - A Comprehensive Introduction. India: McGraw Hill Education.
  • Web 1: The Java™ Tutorials [1]
  • Web 2: Java T Point Tutorial [2]
  • Web 3: NTU notes on Java [3]

Course Running Status (~100%)

Unit/Chapter Topic Status Remarks
1 Inheritance Completed 23/07/2021
2-3 Packages and Interfaces Completed 03/09/2021
4 Exception Handling Completed 01/10/2021
5 File Handling Completed 15/11/2021
6 GUI Programming (Event Handling, AWT) Completed 12/11/2021