Course syllabus
Course-PM
TDA547 Object Oriented Programming HT19 (7,5hp)
Revised November 28, 2018
Department of Computer Science and Engineering.
Course purpose
The course covers basic concepts of imperative and object-oriented programming, as realized in Java. We will discuss the basic language constructs and some simple guidelines for program design. A number of classes in the Java standard library are used in different assignments. The aim is to show how the library provides the ability to write programs, including:
- graphical user interfaces.
- manipulation of sounds and images, as an example of signal and image processing.
- retrieval of data from the web for further processing.
- handling large data sets using existing classes with efficient data structures.
Schedule
Contact details
Examiner: Krasimir Angelov (krasimir@chalmers.se)
Assistants:
Hannes Gustafsson <ghannes@student.chalmers.se>
Eric Bjuhr <ericbju@student.chalmers.se>
Yazan Ghafir <ghafir@student.chalmer.se>
Mattias Wiberg <matwib@student.chalmers.se>
Course literature
We will not be especially careful to follow a course book. We recommend primarily that you have access to any of the following books:
- Java For Everyone Late Objects. The book is in English and available from Cremona.
- Jan Skansholm: Java direkt. The book is in Swedish and available from Cremona.
- David J. Eck: Introduction to Programming using Java, 6th ed.. The book can be downloaded for free from the network, both in html form and as PDF.
- Kevin Wayne, Robert Sedgewick: Introduction to Programming in Java. An excellent textbook very well chosen examples.
The lecture notes in the course are linked to the relevant chapters in the first book. The first two books you can also take with you on the exam.
Course design
The course consists of two lectures per week and two lab supervision sessions. During the course the students should submit six lab assignments. The will be also exercise sessions once a week
Examination form
The students must have completed the lab assignments and passed written examinations
Learning objectives and syllabus
The aim of the course is that students will learn to write, test and document simple Java programs. They will also develop their ability to understand, and thereby modify, debug and extend a given program.
Link to the syllabus on Studieportalen.
Outcomes
Knowledge and Understanding
After completing the course the students will be able to:
- explain basic concepts of imperative and object-oriented programming, especially as they are realized in the programming language used in the course.
This means, for example, to be able to
- explain the difference between primitive types and reference types, and illustrate this with diagrams of memory cells with values and pointers.
- explain the difference between a function (result type different from void, which returns a value, and is used as expression) and a subroutine (with result type void, that does not return value and is used as a procedure).
- explain how single and multi-dimensional arrays are declared, created and used.
- explain the difference between static functions/subroutines (which can only access their parameters, local variables, or other static variables) and methods (which are attached to an object and also have access to the state of the object).
- explain how parameter passing is done when calling subroutines and methods (transfer of value, i.e. the value of the argument in the call is calculated and is given as the initial value for the parameter in subroutine definition).
- explain the relationship between a class and an object (class is a template from which many objects can be created; each of these is an instance of the class).
- describe what an interface is and what is meant by a class implementing an interface.
- explain the concept of subclass and describe how such a declaration works.
- explain what is meant by a recursive function and be able to illustrate this with a simple example.
- describe some standard algorithms, such as sorting and search, and know where they are given in the language's standard library.
This means that, for example, to be able to
- describe binary search in an array, both as an idea and as a code, and know that this is dramatically better than linear search.
- describe insertion sort and know that there are other, better sorting methods (like mergesort and quicksort).
- use routines in the class Array for sorting and searching.
Skills and Abilities
After completing the course students will be able to:
- create simple applications by utilizing the programming language data types and control structures.
This means that, for example, to be able to:
- define static functions and subroutines, with appropriate choice of parameters and the result type, and utilize control structures such as for, while, if and switch statements in a structured way.
- utilize both single- and multi- dimensional arrays that are both parameters and results and utilize standard patterns ((nested) for loops) for programming with arrays.
- properly utilize parameter transmission opportunities (e.g. the parameters of reference type refer to an item allocated by the caller and the updates from the subroutine are visible to the caller) and constraints (e.g. for primitive types such an update in a subroutine is impossible).
- define classes that model simple phenomena in object-oriented style, with encapsulated data read and update via public methods.
This means that, for example, to be able to:
- define simple standalone classes that model concrete or abstract concepts like dice, bank accounts, points, rectangles, counters, etc., with simple state and a small number of methods.
- define classes as above that implement a given interface.
- define subclasses of the given classes to configure these (eg filling a graphic panel with components) or change their behavior by redefining some method (e.g. redefine how a panel is drawn up).
- define model classes that handle the state of a simple program regardless of the user interface.
- be acquainted with a given program, consisting of several classes; in order to debug, extend, improve application behavior according to given instructions.
This means that, for example, to be able to:
- read program code and documentation written by others in order to integrate their own components, possibly after modification of the given code.
- use the Java API to understand classes that use the classes from the standard libraries.
- write simple event-driven programs with graphical interface.
This means that, for example, to be able to:
- apply the general idea of writing event-driven programs by defining listeners registered with the components and then called by the runtime system when the user manipulates the component's graphical representation.
- apply the general idea of separating view and model programs with graphical interface.
- write simple listener for buttons and other components.
- define subclasses to JPanel which function as drawing area, possibly with mouse listeners.
- define subclasses of JPanel containing buttons.
- write main routines that create, fill, and open windows.
- use and search the program library for some standard objects, such as graphical interfaces and data structures.
This means that , for example, to be able to
- use the Java API for searching documentation for classes and methods.
- seek information and use the most common graphical components.
- search for information about classes and interfaces in Java Collections Framework and to use them in your own programs.
- use simple tools to write, compile, execute and documenting programs.
This means that, for example, to be able to:
- use a text editor and the commands javac and java to develop and run Java applications.
- perform simple testing of software components, functions, subroutines and classes.
- comment code and know that particular tool (javadoc) is able to generate API descriptions in a standard format.
Judgement and approach
After completing the course students will be able to:
- identify situations in their continuing education where programming can be an effective tool in their studies.
- identify their need of further knowledge in field of programming and computer science.
Outcomes for over Rankings
In this version there is no specifically formulated goals for the grades 4 and 5, more than to be able to solve problems that are difficult and/or concern situations just discussed a little in the course, which e.g. to
- define functions where the algorithm is not obvious.
- define recursive functions in new situations.
- define classes with user-defined iterators.
- define simple class hierarchies in a non-trivial way utilizing polymorphism.
- define simple classes of linked structures.
Course summary:
Date | Details | Due |
---|---|---|