This website provides the up to date information on course material, exercises and announcements about Programming in Java part 2, Class Design.
The module description can be found here.
Study the theory/ tutorials before you come to class. This will make
the lessons most effective, because the questions that you might have
from studying could be answered immediately.
Studying is not glancing over some (web) pages, but experiment with the compiler, IDE and other tools, to see if you can use the presented ideas and apply it in your own code.
Question answer section, filled by students and moderated by
teachers and student assistants.
To contribute, checkout qanda as e.g. java2sen1qanda in a place convenient to you, add your questions in adoc files in the qanda sub folder or any of its siblings, and add, and commit. We are using version control almost everywhere, remember. That also implies that we know exactly who’s account has been used to commit, in case you intended any pranks.
Code style will help you read code and help us understand
intent. Example: the way you name things. Types, with exception of
primitives, start with a capital. Members, i.e. methods and fields
start with a lower case letter. Exceptions: constants, such as
final fields and enum values are written all caps.
To help you improve your code style, you should use checkstyle , for which there
is a NetBeans plugin. See the NetBeans IDE plugin portal for the
You can find a useful, and not too strict set of rules as
sebivenlo_checks.xml . Download it to your
computer, maybe in your
~/Library directory where you save your
library jar files too. Then point the NetBeans checkstyle
configuration to it, so that it can find your configuration. There
also is an accompanying suppression file, called
sebivenlo_suppressions.xml that helps suppress the most
obnoxious checks, for instance those in test classes. Test classes require
less stringent checks, which is true if you choose proper method
names etc. The tests are mainly about the production code.
In the very near future (from 2017-02-18) we will configure the java related repository with a pre-commit check. That will use the same sebivenlo_checks.xml rule set and the mentioned suppression file .
The solutions to the exercises will published in the same Shared Practicum Repository as the qanda section after lesson or the hand in deadline.
1. Part 1, 1st 7 weeks
1.1. Inheritance and polymorphism, Exceptions.
Week 1. Repetition from Java 1 and dotting the i’s.
Sheets and handouts
Practical task for week 1
Beer exercise . Put the code it in week01, named beerexceptions.
1.2. Enums and Generics
Constants with functionality and more type safe storage.
Practical task for week 2
Optional task: planets and filters about enum and generics .
Unresolved directive in index2017.adoc - include::2017/wk03.adoc
Mid Term tests
|Mid Term exam and performance assessment After 7 weeks of lab and lectures, you will show your knowledge and skill in a theory exam and a performance assessment.|
The exam is a written, paper based multiple choice exam.
The performance assessment is a combined assessment with SEN1.
2. Part 2, weeks 8-14.
Unresolved directive in index2017.adoc - include::2017/wk11_fxbindings.adoc
Unresolved directive in index2017.adoc - include::2017/wk09_threads_socket.adoc
2.1. Numbers and computation
On the proper handling and choosing of Numbers in Java. exercise description: see the sheets
To play with: IEEE 754 Converter .
Some more background material https://en.wikipedia.org/wiki/Single-precision_floating-point_format
Sheets and handhout
Number conversion table (appendix in exam).
Practical task for week 10This weeks exercises are preparations for the written exam. For the exercises, see the slides.
You can download an up to date version of scenebuilder from the gluonhq webiste.