Lecture Notes, Sample Programs and Solutions

[Topics Covered] [Lecture Notes ]  [Sample Programs



 

Topics Covered

Week 1

Topics Covered: Stored-Program Model; Algorithms - properties, preciseness, determinism, definite entry and exit, repeatability; Variables and constants (As programming model and not in Java). Notion of types; An algorithm description to add first 10 numbers.

Week 2

Expressions; Operators; Data types


Week 3

Topics Covered: Variable declaration statements; If - then - else statements; Scoping of variables; Dangling Else (association of else with right if); Grouping of statements to make a single statement (i.e. putting curly braces around the statements); Introduction to the for loop; Boolean data types and boolena expressions. Relations Operators such as <, >, <=3D, >=3D, =3D=3D, !=3D Integer Operators such as % and /.

Week 4

Topics Covered: For loop; While loop; Loop building techniques; Operators post/pre increment and post/pre decrement.

Week 5

Topics Covered: Methods, Parameter passing for the methods, Recursion.

Week 6

Topics Covered: Introduction to class as user defiend data type.

Week 7

Topics Covered: Defined the class and objects
Constructors
Default constructor and clone constructor
char data type
String class
Methods of String class (charAt, length, compareTo, compareToIgnoreCase, indexOf, replace, substring, toLowerCase, toUpperCase)
Scanner class
Methods of Scanner class (next(), nextBoolean(), nextByte(), nextDouble(), nextFloat(), nextInt(), nextLine(), nextLong(), nextShort()).

Week 8

Topics Covered: Arrays (1-d)

Week 9

Topics Covered: Arrays (Multidimensional)
Program building (using multiple classes and objects)
Operators such as +=, -=, *=, /=, &, |, ^, &=, |=, ^=.

Week 10

Topics Covered: Break and Continue statements
Introduction to Exception, try and catch.

Week 11

Topics Covered: Selection Sort Algorithm
Big-oh notation of space and time complexity
Merge sort algorithm

Week 12

Topics Covered:Search Algorithms (linear and binary)
Recursive Algorithms: TowerOfHanoi, Permutations of distinct integers
Command line arguments
System.exit method
Singly Linked list, insertion of elements in front and at end
Deletion of elements in the list

Week 13

Topics Covered: Doubly Linked list, insertion of elements in front, at end, after and before a given element, deletion of elements in the list.
Class inheritance, type cast operators for the objects.


 

Lecture Notes

Java Operator Precedence Table

Lecture 10

[html]

22/Jan

Tuesday

Salih K A

Lecture 11

[html]

23/Jan

Wednesday

Ankur Saxena

Lecture 12

[html]

25/Jan

Friday

Gaurav Saxena

Lecture 13

[pdf]

29/Jan

Tuesday

A N Singh

Lecture 14

[html]

30/Jan

Wednesday

Vidyut Ghosal

Lecture 15

[pdf]

05/Feb

Tuesday

Bhat Vishwas Pundalika

Lecture 16

[pdf]

06/Feb

Wednesday

Ajay Krishnan

Lecture 17

[pdf]

08/Feb

Friday

Sharma Kamal Gopal

Lecture 18

[pdf]

12/Feb

Tuesday

Abhay Arun Khoje

Lecture 19

[pdf]

13/Feb

Wednesday

Ibrahim A

Lecture 20

[pdf]

19/Feb

Tuesday

Khot Sachin Bhivaji

Lecture 21

[pdf]

20/Feb

Wednesday

Prakash Musham

Lecture 22

[pdf]

22/Feb

Friday

Shiraguppi Riyazahamad

Lecture 23

[pdf]

26/Feb

Tuesday

Sumit Agarwal

Lecture 24

[pdf]

27/Feb

Wednesday

Praveen Yedlapalli

Lecture 25

Sudoku Solver

29/Feb

Friday

Surabhi Pandit

Lecture 26

[pdf]

04/Mar

Tuesday

Korwar Arpita Raghavendra

Lecture 27

[pdf]

05/Mar

Wednesday

Shinde Hemant Balasaheb

Lecture 28

[pdf]

07/Mar

Friday

Santosh Sharma A

Lecture 29

No Class

14/Mar

Friday

Vishwas B. C.

Lecture 30

[pdf]

25/Mar

Tuesday

Sujith Thomas

Lecture 31

[pdf]

26/Mar

Wednesday

Panara Amit Valjibhai

Lecture 32

[pdf]

28/Mar

Friday

Anjana Das

Lecture 33

[pdf]

01/Apr

Tuesday

Gandhi Tejas Nagardas

Lecture 34

[pdf]

02/Apr

Wednesday

Parsana Jignesh

Lecture 35

[pdf]

04/Apr

Friday

Gedam Dhiraj Nilkanthrao

Lecture 36

[pdf]

08/Apr

Tuesday

Rahul Prabhakar Kulkarni

Lecture 37

[pdf]

09/Apr

Wednesday

Kamlesh Patel

Lecture 38

[pdf]

11/Apr

Friday

Rama Kant Pathak

Lecture 39

[pdf]

15/Apr

Tuesday

Sameer Agrawal

Lecture 40

[pdf]

16/Apr

Wednesday

Ajin George Joseph


 

Sample Programs

Converts an integer to any base string Int2BaseString.java
Find an integer square root of an integer IntSqRoot.java
Average of upto 20 integers Average.java
Average of any number of integers AnySizeAverage.java
Program to print the day of a given date and calendar for that month Cal.java
Sudoku Solver - In case you are not able to compile it in linux, the problem is most probably with the version of Java being used. Blackdown Java 1.4.2 does not provide Scanner class. The code will run perfectly on Sun Java 6. Sudoku.java
Program to do selection and merge sort for random arrays and print the timings sort.java
Program to print the permutations of distinct integers given on the command line permute.java