Thinking in Java --- Chapter 1 (Notes)

 Interduction to Objects.

1.characteristics -- OO.

   a. Everything is an object.

   b. A program is a buch of objects telling each other what to do by sending msg.

   c. Each objects has its own memory made up of other objects.

   d. Every objects has a type.

   e. All objects of  a particular type can receive the same message.

 

2. Hidden implementation

   a. public

   b. pravite

   c. protect.

 

3. Interchangeable objects with polymorphism.(Picture 1)

To draw a sharp, whatever we want,just tell the tool circle or square or else.

It would draw itself because it know how to draw.

draw is a function of all sharp. That's the thinking way in the real world.

 

4. Design.

 

Keep thinking as below:

1. What are the object? How do you partition your project into its component parts?

2. What are their infterface? What message do you need to be able to send to each object?

 

Phase 0: Let's make a plan

Phase 1: What re we making?

Phase 2; How did we build it?

Phase 3: Let's build it.

Phase 4: Iteration

 

Java Vs C++

C++ is faster than Java. about 20 to 50 times.

Java's development is faster than C++.

 

 

-----------------Kevin's understand-------------------

   OO thinkng is just a way like we do in the real world.

  Image it, every people is an object.(a); When we hung out, we are talking and laughing(b).

  Everyone is a depandent person, who must be different in some way.(c) We all have a type, man or woman.(d)

  We all would laugh when seeing a funny view.(e)

 

  To compare with C++, Java is much slower than it.

  Java is just like VB+, development just in time, but much powerful than VB,especially in web development.

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值