overview of collected java teaching materials · berlin prepared slides in german (based on...

17
1 Humboldt University Berlin, University of Novi Sad, University of Plovdiv, University of Skopje, University of Belgrade, University of Niš, University of Kragujevac Version: Oct. 23, 2003 (D Sep. 22, 2003) DAAD Project “Joint Course on OOP using Java” Overview of collected Java teaching materials M. Ivanović, N. Ibrajter DAAD project „Joint Course on OOP using Java“ © 2 Content 1. SubProject site 2. Collected material 3. Some topics by “Berlin” way 4. Same topic by “Novi Sad” way 5. Some Internet material 6. Further steps and Conclusion

Upload: others

Post on 11-Mar-2020

0 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Overview of collected Java teaching materials · Berlin prepared slides in German (based on previous teaching material) N. Ibrajter translated several lessons in English ... Presentation

1

Humboldt University Berlin, University of Novi Sad, University of Plovdiv,University of Skopje, University of Belgrade, University of Niš, University of Kragujevac

Version: Oct. 23, 2003 (D Sep. 22, 2003)

DAAD Project“Joint Course on OOP using Java”

Overview of collected Java teaching materials

M. Ivanović, N. Ibrajter

DAAD project „Joint Course on OOP using Java“ © 2

Content

1. SubProject site 2. Collected material3. Some topics by “Berlin” way4. Same topic by “Novi Sad” way5. Some Internet material6. Further steps and Conclusion

Page 2: Overview of collected Java teaching materials · Berlin prepared slides in German (based on previous teaching material) N. Ibrajter translated several lessons in English ... Presentation

2

DAAD project „Joint Course on OOP using Java“ © 3

Content

1. SubProject site 2. Collected material3. Some topics by “Berlin” way4. Same topic by “Novi Sad” way5. Some Internet material6. Further steps and Conclusion

DAAD project „Joint Course on OOP using Java“ © 4

Page 3: Overview of collected Java teaching materials · Berlin prepared slides in German (based on previous teaching material) N. Ibrajter translated several lessons in English ... Presentation

3

DAAD project „Joint Course on OOP using Java“ © 5

DAAD project „Joint Course on OOP using Java“ © 6

Page 4: Overview of collected Java teaching materials · Berlin prepared slides in German (based on previous teaching material) N. Ibrajter translated several lessons in English ... Presentation

4

DAAD project „Joint Course on OOP using Java“ © 7

DAAD project „Joint Course on OOP using Java“ © 8

Page 5: Overview of collected Java teaching materials · Berlin prepared slides in German (based on previous teaching material) N. Ibrajter translated several lessons in English ... Presentation

5

DAAD project „Joint Course on OOP using Java“ © 9

DAAD project „Joint Course on OOP using Java“ © 10

Page 6: Overview of collected Java teaching materials · Berlin prepared slides in German (based on previous teaching material) N. Ibrajter translated several lessons in English ... Presentation

6

DAAD project „Joint Course on OOP using Java“ © 11

Content

1. SubProject site 2. Collected material3. Some topics by “Berlin” way4. Same topic by “Novi Sad” way5. Some Internet material6. Further steps and Conclusion

DAAD project „Joint Course on OOP using Java“ © 12

Collected material

Berlin prepared slides in German (based on previous teaching material)N. Ibrajter translated several lessons in EnglishNovi Sad prepared Java book in Serbian (good base for teaching .ppt material)University of Aberdeen (complete .ppt course material from Internet)

Page 7: Overview of collected Java teaching materials · Berlin prepared slides in German (based on previous teaching material) N. Ibrajter translated several lessons in English ... Presentation

7

DAAD project „Joint Course on OOP using Java“ © 13

Novi Sad and Berlin Course Differences

Both courses cover same topicsPresentation will show the differences by the example of one topicBerlin students have the course in 1st and Novi Sad students in 3rd semesterBerlin course, mainly concerns to introduce OO programming paradigmNovi Sad course is much more language specific

DAAD project „Joint Course on OOP using Java“ © 14

Same Content of the Course

Primitive Data TypesOperatorsOperationsStatementsObject-Oriented Programming in JavaObjectsClassesReferencesInheritancePolymorphismExceptionsInner Classes

Page 8: Overview of collected Java teaching materials · Berlin prepared slides in German (based on previous teaching material) N. Ibrajter translated several lessons in English ... Presentation

8

DAAD project „Joint Course on OOP using Java“ © 15

Content

1. SubProject site 2. Collected material3. Some topics by “Berlin” way4. Same topic by “Novi Sad” way5. Some Internet material6. Further steps and Conclusion

DAAD project „Joint Course on OOP using Java“ © 16

Topics in English

Introduction (1):Objects, Classes, Abstract Data Types (48 slides)

Introduction (2):Useful Concepts of OO Paradigm (78 slides)

Inheritance (56 slides)

Exception Handling (46 slides)

Page 9: Overview of collected Java teaching materials · Berlin prepared slides in German (based on previous teaching material) N. Ibrajter translated several lessons in English ... Presentation

9

DAAD project „Joint Course on OOP using Java“ © 17

Introduction (1):Objects, Classes, Abstract Data Types

Programming paradigms: imperative and object-oriented

Data abstraction – Abstract data types – Classes – Instances

Instance variables, instance methods

Example: Stack

DAAD project „Joint Course on OOP using Java“ © 18

Introduction (2):Useful Concepts of OO Paradigm

ADT reuse (classes):• Parenthesis structure checked by a stack• Transformation of recursion to iteration with a stack

Comparison of an imperative with an OO program:TimeTable.java, Time.java, Scheduler.java

ADT as Java API classes: String

Data classes: Pascal, C++

Further concepts:Overloading, this – the actual object, private methods, public variables, alias-problem, lexicographical order

Page 10: Overview of collected Java teaching materials · Berlin prepared slides in German (based on previous teaching material) N. Ibrajter translated several lessons in English ... Presentation

10

DAAD project „Joint Course on OOP using Java“ © 19

Inheritance

Inheritance• Subclasses• Superclasses• Hierarchy building

Simple inheritance (Java)Multiple inheritance (C++)Once more: private, public protectedPolymorphism: Method overloading (<> overriding)Class hierarchy and the class ‘Object'Dynamic binding: dynamic search for methodsfinal-methods, abstract classes"Wrapper-classes"

DAAD project „Joint Course on OOP using Java“ © 20

Content

1. SubProject site 2. Collected material3. Some topics by “Berlin” way4. Same topic by “Novi Sad” way5. Some Internet material6. Further steps and Conclusion

Page 11: Overview of collected Java teaching materials · Berlin prepared slides in German (based on previous teaching material) N. Ibrajter translated several lessons in English ... Presentation

11

DAAD project „Joint Course on OOP using Java“ © 21

NS Course – OO Paradigm and Its Concepts 1/2

19 slides8 code slides, the rest are textual slidesNo picturesStrictly Java language specificOn quite a high level considering terminologyCover OOP paradigm, notion of object, class and reference

DAAD project „Joint Course on OOP using Java“ © 22

NS Course – OO Paradigm and Its Concepts 2/2

Basic philosophy – “structuring programs in a way the objects are organized in a real world”Creating and using types that group data and code segments which use the dataType values are called instancesBasic notions of OO programming style:• object• class• inheritance

Page 12: Overview of collected Java teaching materials · Berlin prepared slides in German (based on previous teaching material) N. Ibrajter translated several lessons in English ... Presentation

12

DAAD project „Joint Course on OOP using Java“ © 23

Content

1. SubProject site 2. Collected material3. Some topics by “Berlin” way4. Same topic by “Novi Sad” way5. Some Internet material6. Further steps and Conclusion

DAAD project „Joint Course on OOP using Java“ © 24

Chapters 8 and 9Inheritance

InheritanceSubtyping

SubstitutionPolymorphic

variablesStatic and dynamic

type

Method polymorphismOverridingDynamic method lookup

Page 13: Overview of collected Java teaching materials · Berlin prepared slides in German (based on previous teaching material) N. Ibrajter translated several lessons in English ... Presentation

13

DAAD project „Joint Course on OOP using Java“ © 25

The Object class

All classes inherit from Object …

DAAD project „Joint Course on OOP using Java“ © 26

DoME hierarchy

Object

Item

CD Video

All classes inherit from Object …

Page 14: Overview of collected Java teaching materials · Berlin prepared slides in German (based on previous teaching material) N. Ibrajter translated several lessons in English ... Presentation

14

DAAD project „Joint Course on OOP using Java“ © 27

Polymorphic variables

Instance variables in Java can be polymorphic.(They can refer to objects of more than one type – but not simultaneously!)

They can hold instances of the declared type, or of subtypes of the declared type.

This is another example of substitution.

DAAD project „Joint Course on OOP using Java“ © 28

Adding items to an ArrayList

public class Database{private ArrayList items;

public void addItem(Item theItem){

items.add(theItem);}...

}

Sometimes contains a CD, sometimes a Video

Page 15: Overview of collected Java teaching materials · Berlin prepared slides in German (based on previous teaching material) N. Ibrajter translated several lessons in English ... Presentation

15

DAAD project „Joint Course on OOP using Java“ © 29

Subtyping and assignment

Vehicle v1 = new Vehicle();Vehicle v2 = new Car();Vehicle v3 = new Bicycle();

subtype instances may be assigned to supertype variables (substitution again)

DAAD project „Joint Course on OOP using Java“ © 30

Content

1. SubProject site 2. Collected material3. Some topics by “Berlin” way4. Same topic by “Novi Sad” way5. Some Internet material6. Further steps and conclusion

Page 16: Overview of collected Java teaching materials · Berlin prepared slides in German (based on previous teaching material) N. Ibrajter translated several lessons in English ... Presentation

16

DAAD project „Joint Course on OOP using Java“ © 31

Further Steps and Conclusion

Courses organize content of the topics by different criteriaThe main impression is that the major goal of the Berlin course is to offer a student a clear overview of the OOP using Java• First semester, first programming language

NS course goal, on the other hand, is to deeply involve students with the Java programming language specifics• Third semester, second programming language

DAAD project „Joint Course on OOP using Java“ © 32

Conclusion

Berlin teaching material• More interesting• Much more easy to follow• Puts stress on the difference

between OOP and other programming paradigms

• Clearly shows the difference between Java and Pascal, C

• Introduces some basic data structures, like stack

NS teaching material• More compact• Student is forced to struggle

with terminology• Puts stress on the Java

programming language specifics

• More detailed• Students prefer this way of

presentation- Most of them like to

minimize home work- No suitable additional

literature

Page 17: Overview of collected Java teaching materials · Berlin prepared slides in German (based on previous teaching material) N. Ibrajter translated several lessons in English ... Presentation

17

DAAD project „Joint Course on OOP using Java“ © 33

General Idea about Course MaterialPrepare a collection of different topics and concepts (just language, emphasize on OO design and style of programming, advanced topics, some real complex applications,…). Use different versions of the same topics (Berlin. Novi Sad, Timisoara, Belgrade, Skopje,…)

Prepare complete materials for various stiles of courses• Kernel of same basic topics• Material for a general course on Java programming language• Material for OO programming course• …

Possibility to prepare different courses based on available material (lecturer can make specific selection)