Materials for TU Wien's programming lectures for Welcome.TU.code in the winter term 2016/17
In our last lecture, we concentrated on correction of the christmas project and open homework exercises. As a motivation for further Java programming, we presented Android app development live in AndroidStudio and talked about Web Development (languages, tools, databases, server vs. client side programs, description vs. programming languages).
We wish all participants joy and success for their future programming experiences!
Recap of enums, classes and objects, variable scoping and ArrayList. We started with inheritance. The LiveExample is an optional exercise for self-studying.
Slides: https://www.pervasive.jku.at/Teaching/lvaInfo.php?key=438&do=material SWE1 VO05 Objects I.pdf Username/Password: https://de.m.wikipedia.org/wiki/Befreundete_Zahlen
Recap of variable scoping (Quiz) ArrayList as an alternative to Array which makes life easier Correction of a "bad" implementation with arrays to a good one using ArrayList
Homework: two exercises in homework.pdf
Recap of Object Oriented Programming Examples for using the "Generate" option in IntelliJ for Constructor, Setter and Getters and the toString() method Arrays of self implemented classes
Homework: See the homework.pdf in the folder lecture 05.12 -> until Dec 12
Object Oriented Programming: Constructors, Visibility, Setter&Getter
The homework exercises until next week (Dec 7) are in the particular folder.
Array recap, discussing scope of variables. Indroduction to object-oriented programming with simple examples.
Completing the examples written during lesson (adding toString() and setter - Methods).
Function and Array Recap. Together, we wrote a program which prints words in a frame. A reference implementation can be found in lecture 23.11./presentation/frame. The solution we worked out together on the blackboard and the beamer can be found in lecture 23.11./frame_group-solution.
There are four exercises as homework, you can find them in the lecture 23.11./exercises directory.
After recap we will learn Scanner and 2D-Arrays.
We made a 4 in a row example template. You can also find more exercises on http://codingbat.com/java
String manipulation was repeated and further examples have been explained. Further more we covered Arrays, how to init, fill with data and print them.
###Homework The Homework consists of multiple exercises about arrays. The last exercise is optional and covers multi dimensional arrays.
We started with String manipulations. The functions length, contains, startsWith, endsWith, indexOf and charAt were explained.
###Homework is optional
The method definitions are in the file Homework.java in the lecture directory.
We revisited loops and functions.
You can find the Diamond example in the respective directory.
###Homework until 16.11.2016:
In the lectures directory there is a Project calles exercises. It contains the homework about functions until 16.11.2016.
Some of the exercises were taken from http://www.programmingbydoing.com. There you can find many other useful exercises!
Recap, Finding errors, Exceptions and ExceptionHandling, (Recursion in slides but not presented)
Excercise 5 in homework folder, see slides for explanation
We have learned if-else-statements and while- and for-loops.
We have learned the data type double
and the keyword final
.
Here, you will find:
- Cheatsheet.pdf - an overview of how the Java constructs we have learned so far work
- exercises.pdf - a collection of exercises you can do, but do not have to do
- homework.pdf - this sheet contains the homework assignemnts. (note that there is some additional homework below)
- Presentation.pdf - the presentation slides of today
- IntelliJ-Project - a directory that is an IntelliJ project containing all the programs we have presented in today's lecture. Plus, it contains the program named "Preview" that shows you what you will learn next lecture.
- IntelliJ-Project.zip - the same, but in a single zip-file so that you can download it more easily
Additional homework:
- do the exercise on the for-loop from the presentation slides (slide number 11 of 12)
- try out the program named "Preview" from the IntelliJ project to see what you can do after the next lecture.
We have learned what are variables, how to declare and initialize them, what is a constant, the arithmetic operators and the string concatenation operator.
The presentationc slides are available in the respective directory.