Högskolan i Halmstad
Halmstad University - For the Development of Organisations, Products and Quality of Life

Laborations & Lecturenotes

Note: There are some Swedish in some of the labs.
"om du hinner med, inte obligatoriskt" = "if you have the time, not mandatory"

Week 3


Lecture 1+2PDF (pdf, 830 kB)
(Audio commentary pending)
The basics of computer software and programming.
You assignment:
In the laboratories indicated in the schedule the software needed are pre installed. Start by opening the Greenfoot environment and perform exercise 1+2. Exercise 3 is performed using paper and pen.

Exercise 1 external link (pdf, 670 kB)
Exercise 2, external link (pdf, 830 kB)
Exercise 3 external link (word, 27 kB)

If you find Greenfoot interesting there is a book on the subject: http://www.greenfoot.org/

The exercises should be shown to the lab assistant during week 5.

Week 4


Lecture 3PDF (pdf, 790 kB)
Chapter 1 and 2 in the book, which covers:
  • Objects
  • Classes
  • Compilation
  • Execution
  • Variables
  • Data types
  • Arithmetics

Your assignment:
In the laboratories indicated in the schedule the software needed are pre installed. Start by opening JGrasp - the Java development environment. Use JGrasp to edit, compile and run the programs to solve the assignments described in Exercise 4.

Exercise 4PDF (pdf, 32 kB)

The exercises should be shown to the lab assistant during week 5.

Week 5


Lecture 4PDF (pdf, 1 MB)
Chapter 3 in the book, which covers:
  • Use of classes and objects
  • Java Foundation Classes
  • Reference variables
  • Interactive programs

Classes you have to understand at this stage: String, Random, Math and Graphics.

Exercise 5PDF (pdf, 19 kB)

Week 6


Lecture 5PDF (pdf, 810 kB)
Chapter 5 in the book, which covers:
  • if-else
  • while
  • do-while
  • graphical components

Exercise 6PDF (pdf, 50 kB)

Week 7


Lecture 6PDF (pdf, 810 kB)
Chapter 4 in the book, which covers:
  • instanciation
  • constructors
  • methods
  • graphical components

Exercise 7PDF (pdf, 37 kB)

Week 8


Lecture 7Powerpoint (powerpoint, 500 kB)
Chapter 7 in the book, which covers:
  • arrays of primary types
  • arrays of objects
  • argument passing
Classes you have to understand at this stage: ArrayList

Exercise 8PDF (pdf, 52 kB)

Please note! The following assignments are mandatory:
Tracking Sales
Reversing an Array
Adding To and Removing From an Integer List
A Shopping Cart
The rest of the assignments are optional.

Week 9


Lecture 8PDF (pdf, 850 kB)
Chapter 6, 8, 9, which covers:
  • object oriented design
  • class relations
  • interfaces
  • inheritance
  • methods and parameters
  • static methods and variables

Project specification

Week 10


Lecture 9
Chapter 10 in the book, which covers:
  • try-catch
  • exceptions

Written exam preparation

Page editor: Mattias Weckstén
Page last updated 2010-03-11
Halmstad University  |  Box 823  |  S-301 18  Halmstad, Sweden  |  Tel: +46 35-16 71 00  |  registrator@hh.se |  Visiting address: Kristian IV:s väg 3