Skip to main content

Introductory Programming in Java (August-October 2010)

Teaching: Mondays and Thursdays (9:00-12.00 & 12.45-15.00), at Ovastova. Alternated between lectures, practical, and problem solving sessions.

Lecturer: Sergei Vorobyov, full professor of Information and Communication Technology, resident at Ovastova, reachable by sergeiv AT setur DOT fo

H. & P. Deitel. Java: How to Program.
Early Objects Version, 8th edition, 2010,
ISBN 0136053068.

Other sources:
The following Java sources are useful and will be used:

  1. The Java Tutorial from (also exists in book form; see
  2. Lowe. Java All-in-One Desk Reference for Dummies
  3. Eckel. Thinking in Java
  4. Nielsen.  A Concise and Practical Introduction to Programming Algorithms in Java
  5. Liang. Introduction to Java Programming

Useful Web Resources:
Bookmark and frequently visit the following:

  3. (this is an interactive web site used for the purposes of our course)

Teaching Schedule



Topics covered


Extra assignment


23 Aug

Deitel Ch 2

Deitel Ch 1, 2, install putty, xming, make them operational

Alternatively install Linux


26 Aug

Deitel Ch 3

Deitel Ch 3, Ch 4

Deitel Ch 5, pro-problem-03.txt


30 Aug

Deitel Ch 4-5, Two Biggest in an Array, Search in an Unordered Array, Binary Search in a Sorted Array, Generating Pythagorean Triangles, see .../pub/u1097/*.java



Deitel Ch 6-7, .../pub/ex-01.txt




2 Sep

Always check! Deitel Ch 6-7. Binary search, Insertion Sort, MergeSort, Generating Primes, .../pub/ex-*.txt

Deitel Ch 8-9

Study and improve programs in


6 Sep

Deitel Ch 8-9. Case studies. Factorial, Fibonacchi, recursive and iterative solutions, experiments, comparisons, translation. Card shuffling, random permitations (wrong in Deitel and correct), random simulation for the game of craps and fair generation of random permutations. 0/1 sequence generation, binary addition, subsets generation, recursive generation of 0/1 sequences

Finish binary addition, study and understand programs seen so far

Learn about array partition and Quick Sort in ex-04-qsort.pdf, try to implement


9 Sep

Further case studies: set-theoretic operations, binary multiplication, fast exponentiation,  Partition, QuickSort, classes Array, ArrayList, BigInteger ... See Schedule-100909.txt

Exercises in the end of Schedule-100909.txt

Exercises in Ch 2, 3, 4, 5


13 Sep

See Schedule-100913.txt. Stacks implemented using arrays and lists. Brackets analysis. Bounded circular queues using arrays

See Schedule-100913.txt,.../pub/news.html

Revise, study, comment, improve programs we wrote so far .../pub/u1097/*.java.html


16 Sep

Schedule-100916.txt. Developing class for rationals and rational arithmetic operations. Euclid's Greatest Common Divisor algorithm. Singly Linked Lists. Classes,, implementing constructors and methods. traversing SLLs haead-to-tail and tail-to-head. Comparing two implementations, analysis and experimentation.  

Deitel Ch 6-8 revision.


Further exercises from .../pub/exercises/ex-buffer.txt, on lists and trees


20 Sep

Schedule-100920.txt, Deitel Ch 6-8, further list operations implementation, queues. Trees data type creation. Binary Search Trees, search, traversal, other methods

Carefully study Singly Linked Lists (SLL) and BinarySearchTrees. Implement deletetion of a given element from a list (sorted and/or unsorted) 

Exam-type problem: count the number of occurrences of a given element in a BST. Assume a BST contains duplicates (left subtree contains elements <= the root node, right subtree > node)


23 Sep

List deletions, from sorted and unsorted (SLL/), queues as lists and arrays, Stacks/ as lists and arrays, interfaces, BinarySearchTrees, see pub/news.html

Homework: exercises in the end of BinarySearchTrees/

see pub/news.html


27 Sep


30 Sep


4 Oct


7 Oct

(last session)



22 Oct

Final Exam: any documents,  computers permitted, but no  Internet  allowed; 4-hours problem solving interaction-free session, on computers.

Success evaluation criteria

Four-hour written examination. Reference material permitted. Internet and other communication means forbidden. The existing grade scale will be used. Compulsory assignments count toward success score.