|Unit||Credits||Academic sector||Period||Academic staff|
|Laboratorio||4||INF/01-INFORMATICS||1° Q - solo 1° anno, 2° Q||
|Teoria||8||INF/01-INFORMATICS||1° Q - solo 1° anno, 2° Q||
The course provides the basic notions of computer programming. Namely, it describes the Java programming language and some of its more frequently used library functions. At the end of the course, the student will be able to understand some simple Java programs and to write his owns for solving simple problems.
The course is organised around 64 hours of teaching, split in two trimesters of 32 hours each. It is understood that the student attends at the same time the course of Laboratory of Programming, where he applies and gets familiar with the notions described in the course.
* Java. Compilation and run of Java programs
* The first Java program. Classes, keywords and identifiers
* Methods. print() and println(). Escape sequences
* Constants and variables. Operations.
* Primitive types
* Expressions, precedence, type conversions
* Interactive programs
* Increment and decrement
* String objects and their operations
* The Boolean type. Ordering operators, short-circuit
* Conditionals: if and if/else
* Equals over String objects
* Switch, while, for, scope of the index variable
* Nested loops
* Input files
* Arrays: declaration, creation and access
* Explicit initialisation of the arrays
* Computing over the arrays: creation from the input, search for a key,
search for the minimum element
* Arrays as parameters to methods. Method main()
* Multidimensional arrays
* Classes, objects, constructors, methods, fields
* Inheritance and polymorphism
* super in the constructors
* Access control to fields and methods
* super for accessing fields and methods
* Abstract classes and interfaces
* Exceptions: declaration, throwing and catching
* The throws keyword for the methods
* The finally construct
The examination consists in a written test where the student writes or modifies some program. It is unified with the examination of the Laboratory of Programming course. It is evaluated on the basis of the correctness of the programs as well as of their simplicity, cleanness and possibility of compilation without errors.
The examination can be done in two ways (not necessarily exclusive):
1) (strongly suggested): by passing with success both partial tests that are done in December and March, respectively;
2) by passing with success one of the six tests of Programming and Laboratory of Programming which are done during the year and whose dates are published. If the student handles his classwork at one of these six examinations, the evaluation of the partial tests or of a previous
examination is automatically lost.
|Pighizzini, Ferrari||Dai Fondamenti agli Oggetti (Edizione 2)||Addison-Wesley||2005||8871922506|