-
CS
science/study of problem solving with computers/computational method
2. programming 只是一个工具
天文学和望远镜之间的区别
3. machine language : 0's and 1's
java \ c \ c++ 需要编译器编译成机器能懂的语言
4. 程序员写的是 source code
机器能懂得语言是 object code
5. JAVA编译过程
一部分在virtual machine(虚拟机)
Java → class file(not object file) → link with other class files → JAR archive(中间语言,人和电脑都不懂) → JVM(java virtual machine) → computer
好处:
- 在任何类型的电脑上都可以运行 mac \ pc \ linux
- 写一次可以运行在多个环境
6. JAVA: object - oriented
实际上是a set of class, can have multiple classes
写程序时,实际上是create a class
7. CLASS: encapsilation of behavior + data
8. CLASS强大的原因
eg. Karel supperclass (是superKarel的父类)
SuperKarel subclass of Karel
eg. Eduardo(课上学生名字) → human → primates → mammals → animals
object →
(和学生一样,对象是类的一个实例instances)
classes are the template for those objects
9. JAVA的定义
10. ACM.program Hierarchy
Applet → JApplet → Program → DialogProgram
→ GraphicsProgram
→ CoasoleProgram
11. 程序运行的时候,运行的其实是objects
12. Graphics
Collage - Blank canvas
a) 可以在上面任何位置输入文本
b) Glabel : 图形标签 是 Text
GRect
GOval 椭圆
Gline
以上都是classes, 我们可以建立这些对象的具体实例 instances of these objects