17
1 Advanced Programming Languages 1. Introduction Spring. 2016 Chungnam National Univ. Eun-Sun Cho

Advanced Programming Languages 1. Introductionplas.cnu.ac.kr/courses/2016s/apl/a 1 introduction.pdf · 2016-03-03 · "Effective Java" (Addison-Wesley, 2001; Second Edition, 2008),

  • Upload
    others

  • View
    5

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Advanced Programming Languages 1. Introductionplas.cnu.ac.kr/courses/2016s/apl/a 1 introduction.pdf · 2016-03-03 · "Effective Java" (Addison-Wesley, 2001; Second Edition, 2008),

1

Advanced Programming Languages 1. Introduction

Spring. 2016

Chungnam National Univ.

Eun-Sun Cho

Page 2: Advanced Programming Languages 1. Introductionplas.cnu.ac.kr/courses/2016s/apl/a 1 introduction.pdf · 2016-03-03 · "Effective Java" (Addison-Wesley, 2001; Second Edition, 2008),

“This class is focusing on

Java,

the most popular object-oriented

programming language”

2

Page 3: Advanced Programming Languages 1. Introductionplas.cnu.ac.kr/courses/2016s/apl/a 1 introduction.pdf · 2016-03-03 · "Effective Java" (Addison-Wesley, 2001; Second Edition, 2008),

Object

• Real world objects

– eg) a desk, a dog..

– have states (current position, color, name..) and behaviors (run, move,

paint,..)

• Object-oriented XXX

– a “new” paradigm in computer science : preserving the concept of

objects

– made of value (=state), function (=behavior) and identifier

– object oriented programming, object-oriented design, object-oriented

database, object-oriented …

3

Page 4: Advanced Programming Languages 1. Introductionplas.cnu.ac.kr/courses/2016s/apl/a 1 introduction.pdf · 2016-03-03 · "Effective Java" (Addison-Wesley, 2001; Second Edition, 2008),

Test Yourself

• Real-world objects contain ___ and ___.

• A software object's state is stored in ___.

• A software object's behavior is exposed through ___.

• Hiding internal data from the outside world, and accessing it only through

publicly exposed methods is known as data ___.

• A blueprint for a software object is called a ___.

• Common behavior can be defined in a ___ and inherited into a ___ using

the ___ keyword.

• A collection of methods with no implementation is called an ___.

• A namespace that organizes classes and interfaces by functionality is called

a ___.

• The term API stands for ___

from http://docs.oracle.com/javase/tutorial/java/concepts/ 4

Page 5: Advanced Programming Languages 1. Introductionplas.cnu.ac.kr/courses/2016s/apl/a 1 introduction.pdf · 2016-03-03 · "Effective Java" (Addison-Wesley, 2001; Second Edition, 2008),

Test Yourself

• Real-world objects contain states and behaviors.

• A software object's state is stored in fields.

• A software object's behavior is exposed through methods.

• Hiding internal data from the outside world, and accessing it only through

publicly exposed methods is known as data encapsulation.

• A blueprint for a software object is called a class.

• Common behavior can be defined in a superclass and inherited into a

subclass using the extends keyword.

• A collection of methods with no implementation is called an interface.

• A namespace that organizes classes and interfaces by functionality is called

a package.

• The term API stands for Application Programming Interface.

from http://docs.oracle.com/javase/tutorial/java/concepts/ 5

Page 6: Advanced Programming Languages 1. Introductionplas.cnu.ac.kr/courses/2016s/apl/a 1 introduction.pdf · 2016-03-03 · "Effective Java" (Addison-Wesley, 2001; Second Edition, 2008),

Advantages of Object-Oriented Programming

From Wikipedia

• Encapsulation : ensures good code modularity

• Polymorphism : procedures for objects whose exact type is not

known until runtime

• Inheritance : allows great amount of reuse

really?

6

Page 7: Advanced Programming Languages 1. Introductionplas.cnu.ac.kr/courses/2016s/apl/a 1 introduction.pdf · 2016-03-03 · "Effective Java" (Addison-Wesley, 2001; Second Edition, 2008),

In This Class

• Goal : to learn more advanced object-oriented programming

• Focus

– Java (only)

• C++, C#, Objective-C, Scala, JavaScript would be covered later

– Basic (java.lang & java.util only)

• No JMI, JMS, CORBA, JDBC, Spring, Hibernate, J~..

– Implementation (or designs related to implementation) only

• No RE (requirement analysis) or OOD (object-oriented design)

• Little bit of design patterns or testing

7

Page 8: Advanced Programming Languages 1. Introductionplas.cnu.ac.kr/courses/2016s/apl/a 1 introduction.pdf · 2016-03-03 · "Effective Java" (Addison-Wesley, 2001; Second Edition, 2008),

왜 다 아는 Object-Oriented Programming을 더 깊이 배워야 하나?

• Java 배웠고,

• Eclipse 쓸 줄 알고,

• 코딩 경력도 좀 되고..

• 하지만,

뭔가 섭섭할 때가 온다고 한다.

8

Page 9: Advanced Programming Languages 1. Introductionplas.cnu.ac.kr/courses/2016s/apl/a 1 introduction.pdf · 2016-03-03 · "Effective Java" (Addison-Wesley, 2001; Second Edition, 2008),

Jolt Award

• Awards in the software industry.

• Since 1991, the Dr. Dobb's Jolt Product Excellence &

Productivity Awards have been presented annually to showcase

products that have "jolted" the industry with their significance

and made the task of creating software faster, easier, and more

efficient.

• Jolt Cola sponsors the awards presentation.

9

Click!

Page 10: Advanced Programming Languages 1. Introductionplas.cnu.ac.kr/courses/2016s/apl/a 1 introduction.pdf · 2016-03-03 · "Effective Java" (Addison-Wesley, 2001; Second Edition, 2008),

10

Page 11: Advanced Programming Languages 1. Introductionplas.cnu.ac.kr/courses/2016s/apl/a 1 introduction.pdf · 2016-03-03 · "Effective Java" (Addison-Wesley, 2001; Second Edition, 2008),

Textbook: “Effective Java”

11

2000 2008

Page 13: Advanced Programming Languages 1. Introductionplas.cnu.ac.kr/courses/2016s/apl/a 1 introduction.pdf · 2016-03-03 · "Effective Java" (Addison-Wesley, 2001; Second Edition, 2008),

Author: Joshua Bloch

13

Joshua Bloch is a software architect in the Open Source Program

Office at Google, author of the bestselling, Jolt Award-winning

"Effective Java" (Addison-Wesley, 2001; Second Edition, 2008),

and coauthor of "Java Puzzlers: Traps, Pitfalls, and Corner Cases"

(Addison-Wesley, 2005) and "Java Conurrency in Practice"

(Addison-Wesley, 2006). He was previously a Distinguished

Engineer at Sun Microsystems, where he led the design and

implementation of numerous Java platform features including the

Java Collections Framework and JDK 5.0 language

enhancements. He holds a Ph.D. from CMU and a B.S. from

Columbia….

Page 14: Advanced Programming Languages 1. Introductionplas.cnu.ac.kr/courses/2016s/apl/a 1 introduction.pdf · 2016-03-03 · "Effective Java" (Addison-Wesley, 2001; Second Edition, 2008),

Table of Contents

1. Introduction

2. Creating and Destroying Objects

3. Methods Common to All Objects

4. Classes and Interfaces

5. Generics

6. Enums and Annotations

7. Methods

8. General Programming

9. Exceptions

10. Concurrency

11. Serialization

14

Page 15: Advanced Programming Languages 1. Introductionplas.cnu.ac.kr/courses/2016s/apl/a 1 introduction.pdf · 2016-03-03 · "Effective Java" (Addison-Wesley, 2001; Second Edition, 2008),

Table of Contents

1. Introduction

2. Creating and Destroying Objects

3. Methods Common to All Objects

4. Classes and Interfaces

5. Generics

6. Enums and Annotations

7. Methods

8. General Programming

9. Exceptions

10. Concurrency

11. Serialization

15

Page 16: Advanced Programming Languages 1. Introductionplas.cnu.ac.kr/courses/2016s/apl/a 1 introduction.pdf · 2016-03-03 · "Effective Java" (Addison-Wesley, 2001; Second Edition, 2008),

More on our class..

16

Page 17: Advanced Programming Languages 1. Introductionplas.cnu.ac.kr/courses/2016s/apl/a 1 introduction.pdf · 2016-03-03 · "Effective Java" (Addison-Wesley, 2001; Second Edition, 2008),

“The true measure of a language isn’t

how it uses semicolons;

it’s the standard library.”

- Guido van Rossum,

Inventor of Python and ABC,

BSD Unix contributor

17