How to Teach Java

From WikiEducator
Jump to: navigation, search


Some Title
Convenor: Yiannis Foukarakis
Participants:

Kim Tucker, Nikos Peltekis

Summary:

Introduction

The discussion was primarily aimed at teaching Java to first year university students or high school, though we did touch on teaching kids Java.

We started with a "brain dump" to surface any aspect of this large topic for discussion. Some of these were discussed briefly as we went along and we took these notes which mainly link to resources of use to teachers and learners of Java.

Brain Dump

  • First make it fun :-).

There are many things to teach:

  • Object Oriented Programming
  • Language syntax
  • Basic Java Libraries for students with some background in C/C++
  • Using an IDE
  • Testing
  • etc.

Resources

Books


Tutorials

These tutorials also indicate the fundamental topics to be taught.


IDEs

  • BlueJ
  • Eclipse
  • NetBeans
  • JBuilder
    • Early versions generated ugly code and reams of it (bad for students to see, and inflexible, difficult to customise)
  • Borland Together - UML <-> Java
  • IntelliJ IDEA (full version commercial, but community edition is good for the basics)
    • Nice for students to see debugging
  • Teaching should start without an IDE in order to introduce the students to java basics.


Editors

Sites with Tests

Approach

Define your objectives:

  • By the end of this module students will be able to ...
  • Engage the students in coding activities - it must be fun
  • Understand the language (paradigm - OO, syntax, constructors, libraries, ...)
  • How to program in context - real world collaborative application development.

What is fun?

  • It is not fun to write programs that are of no use to anyone
    • avoid arbitrary exercises
    • some problem solving exercises can be interesting and fun
    • challenging but not too challenging

When in the curriculum to introduce Java?

  • Java may be introduced when OO is introduced.
    • Universities teach concepts rather than language specifics.
    • Teach generic language constructs (declarations, loops, recursion, ...)
    • Data structures
    • Objects
      • Classes, objects, messaging

How?

  • Learn by example (copy-modify)

Other related exercises:

  • CRC Cards - role playing
  • UML tutorials and exercises using tools such as
    • ArgoUML
    • Fujaba
    • ATL
    • In general. use real world objects like vehicles, parking lots, animals, musical instruments, etc. (inheritance, collections, ...) - and use the same example for many constructs

Self (or instructor) testing:

  • Use sites with tests to allow students try on their own.
  • RoboCode - most popular.

Design:

  • Patterns and idioms (but only after a certain level of familiarity with the language has been reached).


Further Resources

Recommendations:

Freedom to teach in different ways for different students using the hints and resources above.