Institute of Computer Science
  1. Courses
  2. 2018/19 spring
  3. Object-Oriented Programming (Narva College) (LTAT.NR.003)
ET
Log in

Object-Oriented Programming (Narva College) 2018/19 spring

  • Home
  • Materials
  • Java Glossary
  • Source Example
  • Cheat sheet (S1-S6)
  • Grading
  • Links

Before session 2

Program Control Statements. Loops. Methods. Arrays.

Objectives:

After completing the session, a student can:

  • explain the following terms: program control statements, loops, signature of a method, formal and actual parameters, types of methods, a return statement;
  • control program flow using if statements and nested if statements;
  • choose the appropriate repetition control statement for a given task and implement it in a program using while, do-while or for (nested) statements;
  • define simple static methods with formal parameters;
  • invoke static methods with actual parameters;
  • define methods with a return value;
  • use method overloading;
  • describe the essence of arrays in programming;
  • declare a one- and multidimensional array;
  • declare, create, and initialize a one- and multidimensional array using an array initializer;
  • access array elements using indexes;
  • simplify programming using the for each loops;
  • retrieve data from the command line and convert them into an appropriate data type.

Topics

  • 2.1 Conditional statements
  • 2.2 Loops
  • Static methods (or class methods)
    • 2.3 Void method
    • 2.4 Value methods
    • 2.5 Overloading of methods
  • Arrays
    • 2.6 One-dimensional arrays
    • 2.7 Multidimensional arrays
  • 2.8 Command-line arguments
  • 2.9 Tasks

NB! Watch the video in youtube if you need the subtitles!

Alternative materials

  • in English:
    • H. Schildt.‎ Java - The Complete Reference: Chapters: 3 (arrays), 5, 7
    • A. B. Downey and C. Mayfield. Think Java: How to Think Like a Computer Scientist: Chapter 4, 6, 8
  • in Estonian: here
  • in Russian:
    • Г. Шилдт. Java 8. Полное руководство: Chapters: 3 (arrays), 5, 7
    • Videos 8- 10

  • Institute of Computer Science
  • Faculty of Science and Technology
  • University of Tartu
In case of technical problems or questions write to:

Contact the course organizers with the organizational and course content questions.
The proprietary copyrights of educational materials belong to the University of Tartu. The use of educational materials is permitted for the purposes and under the conditions provided for in the copyright law for the free use of a work. When using educational materials, the user is obligated to give credit to the author of the educational materials.
The use of educational materials for other purposes is allowed only with the prior written consent of the University of Tartu.
Terms of use for the Courses environment