Java 3: Object-oriented programming - Programmer Books

 ?

POUL KLAUSEN

JAVA 3: OBJECTORIENTED

PROGRAMMING

SOFTWARE DEVELOPMENT

2

Java 3: Object-oriented programming: Software Development

1st edition

? 2017 Poul Klausen &

ISBN 978-87-403-1691-9

Peer review by Ove Thomsen, EA Dania

3

JAVA 3: OBJECT-ORIENTED PROGRAMMING

Contents

CONTENTS

Foreword

6

1

Introduction

8

2

Classes

15

Exercise 1

20

More classes

22

Exercise 2

34

Exercise 3

35

Problem 1

38

2.2

Methods

41

2.3

Objects

46

2.4

Visibility

48

2.5

Statical members

49

2.6

The CurrencyProgram

53

Problem 2

66

2.1

Free eBook on

Learning & Development

By the Chief Learning Officer of McKinsey

Download Now

4

JAVA 3: OBJECT-ORIENTED PROGRAMMING

Contents

3

Interfaces

69

3.1

Interfaces

70

Exercise 4

82

More students

83

Exercise 5

91

Factories

94

Exercise 6

97

Inheritance

98

3.2

3.3

4

Exercise 7

111

Problem 2

112

4.1

More about inheritance

118

5

The class Object

119

6

Typecast of objects

128

7

A last note about classes

130

7.1

Considerations about inheritance

130

Problem 3

134

7.2

The composite pattern

142

8

Final example

143

8.1

Analyse

144

8.2

Design

148

8.3

Programming

155

Appendix A

159

Comment the code

159

Debug the code

162

Unit test

164

5

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download