OOP with Java 通知 Project 3: 4 月 19 日晚 9 点
|
|
- 儿夜 范
- 6 years ago
- Views:
Transcription
1 OOP with Java Yuanbin Wu
2 OOP with Java 通知 Project 3: 4 月 19 日晚 9 点
3 复习 Upcasting 同一基类的不同子类可以被视为同一类型 ( 基类 ) 放宽类型一致性 简化接口 class A{ class B{ A a = new A(); B b = new B(); // A a = new B(); compile error class A{ class B extends A{ A a = new A(); B b = new B(); A a = new B(); // upcasting
4 复习 多态 class Instrument { public void play(int note) { System.out.println( Instrument.play() + n); public class Wind extends Instrument { public void play(int note) { System.out.println( Wind.play() + n); public class Music { public static void tune(instrument i) { i.play(); public static void main(string []args){ Wind flute = new Wind(); Stringed violin = new Stringed(); Brass frenchhorn = new Brass(); tune(flute); tune(violin); tune(frenchhorn); public class Stringed extends Instrument { public void play(int note) { System.out.println( Stringed.play() + n); public class Brass extends Instrument { public void play(int note) { System.out.println( Brass.play() + n); 多态 (Polymorphism) 参数 Instrument I 可以代表不同的子类, 并能正确调用它们的方法 ( 即, 有多种表现形态 )
5 复习 静态绑定 函数的调用在编译后便确定, 也称为 early binding 优点 : 快速, 易于 debug, 缺点 : 接口繁琐 动态绑定 函数的调用在运行时才能确定也称 late binding 优点 : 接口简洁缺点 : 函数调用需要额外开销 Java 中的所有方法都采用动态绑定, 除了 final Static 数据成员不动态绑定
6 OOP with Java 抽象类 接口 定义 实现多个接口 扩展接口 接口适配器 应用 : 工厂模式
7 抽象类 父类的方法 Instrument: play() 子类重写父类的方法 Wind: play() Stringed: play() Brass: play() 可扩展性 用户程序仅知父类方法 子类修改不会影响用户程序 play() Wind Instrument play() Stringed play() play() Brass public class Music { public static void tune(instrument i) { i.play(); public static void main(string []args){ Wind flute = new Wind(); Stringed violin = new Stringed(); Brass frenchhorn = new Brass(); tune(flute); tune(violin); tune(frenchhorn);
8 抽象类 如果所有子类都将重写该方法 Instrument: play()?? 是否有机制 : 在父类中不指定该方法的具体实现 禁止调用父类的该方法 Instrument play() play() Wind Stringed play() play() Brass
9 抽象类 抽象方法 (abstract method) 仅提供方法的名称, 参数和返回值 没有具体实现 使用 abstract 关键字 class Instrument { public void play(int note) { System.out.println( Instrument.play() + n); abstract class Instrument { public abstract void play(int note) ; 普通方法 抽象方法
10 抽象类 抽象类 (abstract class) 包含抽象方法的类称为抽象类
11 抽象类 抽象类 abstract class Instrument { public abstract void play(int note) ; public class Wind extends Instrument { public void play(int note) { System.out.println( Wind.play() + n); public class Stringed extends Instrument { public void play(int note) { System.out.println( Stringed.play() + n); public class Brass extends Instrument { public void play(int note) { System.out.println( Brass.play() + n);
12 抽象类 是否能创建抽象类的对象? 否 抽象类是不完整的类 其中的抽象方法需要在子类补充完整 ( 重写 ) 后才有意义
13 抽象类 无法创建该类的对象 abstract class Instrument { public abstract void play(int note) ; class Test { public static void main(string []args){ // Instrument in = new Instrument(); // compile error: can not create instances of an abstract class
14 抽象类 abstract Instrument abstract void play(); String what() { /* */ extends Wind Stringed Percussion void play() String what() void play() String what() void play() String what() extends Woodwind void play() String what() Brass void play() String what()
15 abstract class Instrument { public abstract void play(int note) ; public String what() {return Instrument ; class Stringed extends Instrument { public void play(int note) { System.out.println( Stringed.play() + n); public String what() {return Stringed ; public class Music { public static void tune(instrument i) { i.play(); public static void main(string []args){ Wind flute = new Wind(); Stringed violin = new Stringed(); Brass frenchhorn = new Brass(); tune(flute); tune(violin); tune(frenchhorn); class Percussion extends Instrument { public void play(int note) { System.out.println( Percussion.play() + n); public String what() {return Percussion ; abstract class Wind extends Instrument { public abstract void play(int note) ; public String what() {return Wind ; 若子类没有重写父类中的抽象方法, 子类仍为抽象类 class Woodwind extends Wind { public void play(int note) { System.out.println( Woodwind.play() + n); public String what() {return Woodwind ; class Brass extends Wind { public void play(int note) { System.out.println( Brass.play() + n); public String what() {return Brass ;
16 抽象类 总结 抽象类包含抽象方法, 只有方法名, 参数, 返回值, 没有方法的实现 抽象类不能实例化 若子类没有重写父类中的抽象方法, 子类仍为抽象类
17 接口 接口 定义 实现多个接口 扩展接口 接口适配器 应用 : 工厂模式
18 接口 抽象类 抽象方法 普通方法 abstract class Instrument { public abstract void play(int note) ; public String what() {return Instrument ;
19 接口 接口 (Interface) 所有方法都是抽象方法 只有方法的名称, 参数和返回值 没有方法的实现 abstract class Instrument { public abstract void play(int note); public abstract String what(); interface Instrument { void play(int note) ; String what();
20 接口 继承 重用 (class reusing) 子类重用父类的方法 / 数据 upcasting 和多态 接口 父类出现之处可用子类代替 能够调用正确的子类方法 ( 动态绑定 ) 没有代码重用, 仅仅保留 upcasting 和多态
21 接口 接口 所有实现该接口的类都具有接口提供的方法 任何使用该接口类型的方法, 都可以使用他的任何一种实现 某种协议 (protocol)
22 接口 接口的实现 接口 : 方法长什么样? 实现 : 方法具体怎样工作?
23 接口 接口的实现 abstract class Instrument { public abstract void play(int note); public abstract String what(); interface Instrument { void play(int note) ; String what(); class Stringed extends Instrument { public void play(int note) { System.out.println( Stringed.play() + n); public String what() {return Stringed ; class Stringed implements Instrument { public void play(int note) { System.out.println( Stringed.play() + n); public String what() {return Stringed ; 继承 : 1. extends 关键字 2. 父类, 子类关系 3. class, extends 接口 : 1. implements 关键字 2. 接口, 实现关系 3. interface, implements
24 interface Instrument void play(); String what(); implements Wind Stringed Percussion void play() String what() void play() String what() void play() String what() extends Woodwind void play() String what() Brass void play() String what()
25 interface class Instrument { void play(int note) ; String what(); class Stringed implements Instrument { public void play(int note) { System.out.println( Stringed.play() + n); public String what() {return Stringed ; public class Music { public static void tune(instrument i) { i.play(); public static void main(string []args){ Wind flute = new Wind(); Stringed violin = new Stringed(); Brass frenchhorn = new Brass(); tune(flute); tune(violin); tune(frenchhorn); class Percussion implements Instrument { public void play(int note) { System.out.println( Percussion.play() + n); public String what() {return Percussion ; class Wind implements Instrument { public void play(int note) { System.out.println( Wind.play() + n); public String what() {return Wind ; 普通类, 抽象类, 接口 class Woodwind extends Wind { public void play(int note) { System.out.println( Woodwind.play() + n); public String what() {return Woodwind ; class Brass extends Wind { public void play(int note) { System.out.println( Brass.play() + n); public String what() {return Brass ;
26 接口 接口 所有方法默认为 public interface Instrument { void play(int note) ; String what(); interface Instrument { public void play(int note) ; public String what();
27 接口 接口 所有数据默认为 final static 定义常量 interface Week { int MONDAY = 1; int TUESDAY = 2; int WEDNESDAY = 3; int THURSDAY = 4; int FRIDAY = 5; int SATURDAY = 6; int SUNDAY = 7; class Week { public static final int MONDAY = 1; public static final int TUESDAY = 2; public static final int WEDNESDAY = 3; public static final int THURSDAY = 4; public static final int FRIDAY = 5; public static final int SATURDAY = 6; public static final int SUNDAY = 7;
28 接口 接口 定义 实现多个接口 扩展接口 接口适配器 应用 : 工厂模式
29 接口 一个类实现多个接口 Interface Plane void fly() Interface Boat void sail() implements Seaplane void fly() void sail()
30 接口 一个类实现多接口 interface Plane { void fly(); interface Boat { void sail(); class Seaplane implements Plane, Boat { public void fly(){ System.out.println( Fly! ); public void sail(){ System.out.println( Sail! );
31 接口 问题 : 如果将接口替换成普通类会如何? Interface Plane Interface Boat Plane Boat void fly() void sail() void fly() void sail() implements? extends Seaplane Seaplane void fly() void sail() void fly() void sail()
32 接口 多继承问题 Diamond problem Transportation void forward() void backward() Seaplane s = new Seaplane(); // s.forward() which one? extends Plane void forward() void backward() void fly() Boat void forward() void backward() void sail() extends Seaplane void forward() void backward() void fly() void sail()
33 接口 多继承问题 父类只能有一个普通类 / 抽象类 class A { class B { /* error class C extends A, B { */
34 接口 Abstract or Concrete Base class interface 1 interface 2 interface n Base class methods interface 1 interface 2... interface n Methods of the derived class
35 interface CanFight { void fight(); interface CanSwim { void swim(); interface CanFly { void fly(); class ActionCharacter { public void fight() { class Hero extends ActionCharacter Implements CanFight, CanSwim, CanFly{ public void fly() { public void swim() { public class Adventure { public static void t(canfight x) { x.fight(); public static void u(canswim x) { x.swim(); public static void v(canfly x) { x.fly(); public static void w(actioncharacter x) { x.fight(); public static void main(string []args) { Hero h = new Hero(); t(h); u(h); v(h); w(h); 1. 实现多个接口可以 upcast 到不同的类 2. abstract class or interface?
36 接口 实现多个接口 名字冲突 interface I1 { void f(); class C1 implements I1, I2{ public void f() { interface I2 { void f(); interface I3 { void f(int i); interface I4 { int f(); class C2 implements I1, I3{ public void f() { public void f(int i) { /* compile error: return type incompatible class C2 implements I1, I4{ public void f() { */
37 接口 接口 定义 实现多个接口 扩展接口 接口适配器 应用 : 工厂模式
38 接口 扩展接口 interface A { interface B extends A{ interface D { interface D extends A, C{
39 interface Monster { void menace(); interface DangerousMonster extends Monster{ void destroy(); class DragonZilla implements DangerousMonster{ public void menace() { public void destroy() { public class HorrorShow { public static void u(monster x) { x.menace(); public static void v(dangerousmonster x) { x.menace(); x.destroy(); public static void w(lethal x) { x.kill(); public static void main(string []args) { DangerousMonster m = DangerousZilla(); u(m); v(m); Vampire a = VeryBadVampire(); u(a); v(a); w(a); interface Lethal { void kill(); interface Vampire extends DangerousMonster, Lethal{ void drinkblood(); class VeryBadVampire implements Vampire{ public void menace() { public void destroy() { public void kill() { public void drinkblood() {
40 接口 接口 定义 实现多个接口 扩展接口 接口适配器 应用 : 工厂模式
41 接口 接口适配器 (Adapter) 方法 f(interface1 i) 类 A 已经写好, 但在并没有实现 Interface1 接口 希望方法 f() 能处理类 A 的对象 复用方法 f() 的代码
42 interface CanFly { void fly(); class Bird implements CanFly{ public void fly() { class Person { public void walk(){ public void buyticket(){ public void takeflight(){ class Insect implements CanFly{ public void fly() {? class Adventure { public static void travel(canfly c) { c.fly(); public static void main(string []args){ Bird b = new Bird(); Insect ins = new Insect(); travel(b); travel(ins);
43 interface CanFly { void fly(); class Person { public void walk(){ public void buyticket(){ public void takeflight(){ class Adventure { public static void travel(canfly c) { c.fly(); public static void main(string []args){ Bird b = new Bird(); Insect ins = new Insect(); travel(b); travel(ins); Person p = new Person(); PersonAdapter pd = new PersonAdapter(p); travel(pd); class PersonAdapter implements CanFly{ private Person p; public PersonAdapter(Person p{ this.p = p; public void fly(){ p.buyticket(); p.takeflight();
44 接口 接口适配器 通过增加一个接口的实现, 使得现有类能够被 适配 到该接口
45 接口 接口适配器 Existing class (Person) Adapter (PersonAdapter) Existing interface (CanFly)
46 接口 接口 定义 实现多个接口 扩展接口 接口适配器 应用 : 工厂模式
47 接口 应用 : 工厂模式 更灵活的构造对象方式
48 interface Service { void method1(); void method2(); class Impl1 implements Service { public void method1() { System.out.println( Imp1.method1 ); public void method2() { System.out.println( Imp1.method2 ); public class TestService { public static void consume(service s) { s.method1(); s.method2(); public static void main(string []args){ Service s1 = new Impl1(); Service s2 = new Impl2(); consume(s1); consume(s2); class Impl2 implements Service { public void method1() { System.out.println( Imp2.method1 ); public void method2() { System.out.println( Imp2.method2 ); 当构造对象 / 初始化比较繁琐时, 可以增加一层包装
49 interface Service { void method1(); void method2(); class Impl1 implements Service { public void method1() { System.out.println( Imp1.method1 ); public void method2() { System.out.println( Imp1.method2 ); class Impl2 implements Service { public void method1() { System.out.println( Imp2.method1 ); public void method2() { System.out.println( Imp2.method2 ); interface ServiceFactory { Service getservice(); class Impl1Factory implements ServiceFactory { public Service getservice() { return new Impl1(); class Impl2Factory implements ServiceFactory { public Service getservice() { return new Impl2(); public class TestService { public static void consume(servicefactory sf) { Service s = sf.getservice(); s.method1(); s.method2(); public static void main(string []args){ ServiceFactory sf1 = new Impl1Factory(); ServiceFactory sf2 = new Impl2Factory(); consume(sf1); consume(sf2);
50 总结 抽象类 抽象方法 : 只给出方法的名字, 参数, 返回值, 没有具体实现 抽象类 : 包含抽象方法的类 abstract 关键字 接口 所有的方法都是抽象方法 interface, inplements 关键字 接口的扩展 : extends 实现多个接口 接口适配器
OOP with Java 通知 Project 4: 推迟至 4 月 25 日晚 9 点
OOP with Java Yuanbin Wu cs@ecnu OOP with Java 通知 Project 4: 推迟至 4 月 25 日晚 9 点 复习 Protected 可以被子类 / 同一包中的类访问, 不能被其他类访问 弱化的 private 同时赋予 package access class MyType { public int i; public double d; public
More informationOOP with Java 通知 Project 4: 4 月 19 日晚 9 点
OOP with Java Yuanbin Wu cs@ecnu OOP with Java 通知 Project 4: 4 月 19 日晚 9 点 复习 Protected 可以被子类 / 同一包中的类访问, 不能被其他类访问 弱化的 private 同时赋予 package access class MyType { public int i; public double d; public char
More informationOOP with Java 通知 Project 4: 4 月 18 日晚 9 点 关于抄袭 没有分数
OOP with Java Yuanbin Wu cs@ecnu OOP with Java 通知 Project 4: 4 月 18 日晚 9 点 关于抄袭 没有分数 复习 类的复用 组合 (composition): has-a 关系 class MyType { public int i; public double d; public char c; public void set(double
More informationOOP with Java 通知 Project 4: 5 月 2 日晚 9 点
OOP with Java Yuanbin Wu cs@ecnu OOP with Java 通知 Project 4: 5 月 2 日晚 9 点 复习 Protected 可以被子类 / 同一包中的类访问, 不能被其他类访问 弱化的 private 同时赋予 package access class MyType { public int i; public double d; public char
More informationOOP with Java 通知 Project 4: 4 月 19 日晚 9 点
OOP with Java Yuanbin Wu cs@ecnu OOP with Java 通知 Project 4: 4 月 19 日晚 9 点 复习 类的复用 组合 (composition): has-a 关系 class MyType { public int i; public double d; public char c; public void set(double x) { d
More informationOOP with Java 通知 Project 7, 6 月 14 日晚 9 点 本周四上机课正常进行 答疑 本周三, 周五下午 1:00 3:00, 理科楼 B911 6 月 12 日考试 ( 随堂 ) 下午 1:00-3:00 教书院 218
OOP with Java Yuanbin Wu cs@ecnu OOP with Java 通知 Project 7, 6 月 14 日晚 9 点 本周四上机课正常进行 答疑 本周三, 周五下午 1:00 3:00, 理科楼 B911 6 月 12 日考试 ( 随堂 ) 下午 1:00-3:00 教书院 218 OOP with Java 题目类型 : 选择 : 30% 问答 : 30% 编程 :
More informationOOP with Java 通知 Project 4: 5 月 2 日晚 9 点
OOP with Java Yuanbin Wu cs@ecnu OOP with Java 通知 Project 4: 5 月 2 日晚 9 点 复习 类的复用 组合 (composition): has-a 关系 class MyType { public int i; public double d; public char c; public void set(double x) { d =
More informationOOP with Java 通知 Project 3: 3 月 29 日晚 9 点 4 月 1 日上课
OOP with Java Yuanbin Wu cs@ecnu OOP with Java 通知 Project 3: 3 月 29 日晚 9 点 4 月 1 日上课 复习 Java 包 创建包 : package 语句, 包结构与目录结构一致 使用包 : import restaurant/ - people/ - Cook.class - Waiter.class - tools/ - Fork.class
More information软件工程文档编制
实训抽象类 一 实训目标 掌握抽象类的定义 使用 掌握运行时多态 二 知识点 抽象类的语法格式如下 : public abstract class ClassName abstract void 方法名称 ( 参数 ); // 非抽象方法的实现代码 在使用抽象类时需要注意如下几点 : 1 抽象类不能被实例化, 实例化的工作应该交由它的子类来完成 2 抽象方法必须由子类来进行重写 3 只要包含一个抽象方法的抽象类,
More information슬라이드 1
2018-2019 年度第二学期 00106501 计算机图形学 童伟华管理科研楼 1205 室 E-mail: tongwh@ustc.edu.cn 中国科学技术大学数学科学学院 http://math.ustc.edu.cn/ 附讲三 C/C++ 编程 ( 二 ) 2 C++ 特点 C++ 是面对对象 (object oriented) 编程语言 纯面向对象语言 : 指不管什么东西, 都应该存在于对象之中,
More informationOOP with Java 通知 Project 4: 5 月 2 日晚 9 点
OOP with Java Yuanbin Wu cs@ecnu OOP with Java 通知 Project 4: 5 月 2 日晚 9 点 复习 Java 包 创建包 : package 语句, 包结构与目录结构一致 使用包 : import restaurant/ - people/ - Cook.class - Waiter.class - tools/ - Fork.class - Table.class
More informationMac Java import com.apple.mrj.*;... public class MyFirstApp extends JFrame implements ActionListener, MRJAboutHandler, MRJQuitHandler {... public MyFirstApp() {... MRJApplicationUtils.registerAboutHandler(this);
More information詞 彙 表 編 號 詞 彙 描 述 1 預 約 人 資 料 中 文 姓 名 英 文 姓 名 身 份 證 字 號 預 約 人 電 話 性 別 2 付 款 資 料 信 用 卡 別 信 用 卡 號 信 用 卡 有 效 日 期 3 住 房 條 件 入 住 日 期 退 房 日 期 人 數 房 間 數 量 入
100 年 特 種 考 試 地 方 政 府 公 務 人 員 考 試 試 題 等 別 : 三 等 考 試 類 科 : 資 訊 處 理 科 目 : 系 統 分 析 與 設 計 一 請 參 考 下 列 旅 館 管 理 系 統 的 使 用 案 例 圖 (Use Case Diagram) 撰 寫 預 約 房 間 的 使 用 案 例 規 格 書 (Use Case Specification), 繪 出 入
More informationOOP with Java 通知 Project 3 提交时间 3 月 29 日晚 9 点 Piazza Project 2 投票
OOP with Java Yuanbin Wu cs@ecnu OOP with Java 通知 Project 3 提交时间 3 月 29 日晚 9 点 Piazza Project 2 投票 复习 创建对象 构造函数 函数重载 : 函数 = 函数名 + 参数列表 public class MyType { int i; double d; char c; void set(double x)
More information无类继承.key
无类继承 JavaScript 面向对象的根基 周爱 民 / aimingoo aiming@gmail.com https://aimingoo.github.io https://github.com/aimingoo rand = new Person("Rand McKinnon",... https://docs.oracle.com/cd/e19957-01/816-6408-10/object.htm#1193255
More informationSDK 概要 使用 Maven 的用户可以从 Maven 库中搜索 "odps-sdk" 获取不同版本的 Java SDK: 包名 odps-sdk-core odps-sdk-commons odps-sdk-udf odps-sdk-mapred odps-sdk-graph 描述 ODPS 基
开放数据处理服务 ODPS SDK SDK 概要 使用 Maven 的用户可以从 Maven 库中搜索 "odps-sdk" 获取不同版本的 Java SDK: 包名 odps-sdk-core odps-sdk-commons odps-sdk-udf odps-sdk-mapred odps-sdk-graph 描述 ODPS 基础功能的主体接口, 搜索关键词 "odpssdk-core" 一些
More information内 容 简 介 本 书 是 一 本 关 于 语 言 程 序 设 计 的 教 材, 涵 盖 了 语 言 的 基 本 语 法 和 编 程 技 术, 其 中 包 含 了 作 者 对 语 言 多 年 开 发 经 验 的 总 结, 目 的 是 让 初 学 的 读 者 感 受 到 语 言 的 魅 力, 并 掌
语 言 程 序 设 计 郑 莉 胡 家 威 编 著 清 华 大 学 逸 夫 图 书 馆 北 京 内 容 简 介 本 书 是 一 本 关 于 语 言 程 序 设 计 的 教 材, 涵 盖 了 语 言 的 基 本 语 法 和 编 程 技 术, 其 中 包 含 了 作 者 对 语 言 多 年 开 发 经 验 的 总 结, 目 的 是 让 初 学 的 读 者 感 受 到 语 言 的 魅 力, 并 掌 握 语
More informationEJB-Programming-4-cn.doc
EJB (4) : (Entity Bean Value Object ) JBuilder EJB 2.x CMP EJB Relationships JBuilder EJB Test Client EJB EJB Seminar CMP Entity Beans Session Bean J2EE Session Façade Design Pattern Session Bean Session
More information2009年3月全国计算机等级考试二级Java语言程序设计笔试试题
2009 年 3 月 全 国 计 算 机 等 级 考 试 笔 试 试 卷 二 级 Java 语 言 程 序 设 计 ( 考 试 时 间 90 分 钟, 满 分 100 分 ) 一 选 择 题 ( 每 题 2 分, 共 70 分 ) 下 列 各 题 A) B) C) D) 四 个 选 项 中, 只 有 一 个 选 项 是 正 确 的 请 将 正 确 选 项 填 涂 在 答 题 卡 相 应 位 置 上,
More information使 用 Java 语 言 模 拟 保 险 箱 容 量 门 板 厚 度 箱 体 厚 度 属 性 锁 具 类 型 开 保 险 箱 关 保 险 箱 动 作 存 取 款
JAVA 程 序 设 计 ( 肆 ) 徐 东 / 数 学 系 使 用 Java 语 言 模 拟 保 险 箱 容 量 门 板 厚 度 箱 体 厚 度 属 性 锁 具 类 型 开 保 险 箱 关 保 险 箱 动 作 存 取 款 使 用 Java class 代 表 保 险 箱 public class SaveBox 类 名 类 类 体 实 现 封 装 性 使 用 class SaveBox 代 表 保
More information佐證資料
料 龍 樂 2004 年 206 2004 年 218 2005 年 203 2005 年 222 2006 年 202 2006 年 203 2007 年 213 2007 年 216 料 樂 1 女 (205 ) 冷 5566 24 葉 女 麗 (?) 女 29 女 兩 更 老 1 易 狼 & 1 12 1 16 易 & 27 年 31 3 什? 了 說?() ()!. 女! 100 年 樂 2
More information1998目录.mdi
香 港 回 歸 十 年 誌 目 録 卷 首 語 1 一 月 Jan 特 區 政 府 大 力 推 介 基 本 法 001 政 府 採 取 措 施 應 對 禽 流 感 006 心 繫 祖 國 敎 育 事 業 邵 逸 夫 先 生 第 十 一 次 向 內 地 敎 育 捐 款 010 取 消 第 一 收 容 港 利 港 利 民 015 天 災 無 情 人 間 有 情 021 推 動 選 民 登 記, 推 進
More information《大话设计模式》第一章
第 1 章 代 码 无 错 就 是 优? 简 单 工 厂 模 式 1.1 面 试 受 挫 小 菜 今 年 计 算 机 专 业 大 四 了, 学 了 不 少 软 件 开 发 方 面 的 东 西, 也 学 着 编 了 些 小 程 序, 踌 躇 满 志, 一 心 要 找 一 个 好 单 位 当 投 递 了 无 数 份 简 历 后, 终 于 收 到 了 一 个 单 位 的 面 试 通 知, 小 菜 欣 喜
More informationuntitled
4.1AOP AOP Aspect-oriented programming AOP 來說 AOP 令 理 Cross-cutting concerns Aspect Weave 理 Spring AOP 來 AOP 念 4.1.1 理 AOP AOP 見 例 來 例 錄 Logging 錄 便 來 例 行 留 錄 import java.util.logging.*; public class HelloSpeaker
More informationchp6.ppt
Java 软 件 设 计 基 础 6. 异 常 处 理 编 程 时 会 遇 到 如 下 三 种 错 误 : 语 法 错 误 (syntax error) 没 有 遵 循 语 言 的 规 则, 出 现 语 法 格 式 上 的 错 误, 可 被 编 译 器 发 现 并 易 于 纠 正 ; 逻 辑 错 误 (logic error) 即 我 们 常 说 的 bug, 意 指 编 写 的 代 码 在 执 行
More informationMicrosoft Word - 新1-12.doc
实训 5 面向对象编程练习 实训 5 面向对象编程练习 5.1 实训目的 通过编程和上机实验理解 Java 语言是如何体现面向对象编程基本思想 以及如何创建类 和对象 了解成员变量和成员方法的特性 5.2 实训要求 编写一个体现面向对象思想的程序 编写一个创建对象和使用对象的方法的程序 5.3 实训内容 5.3.1 创建对象并使用对象 1 定义一个 Person 类 可以在应用程序中使用该类 成员属性
More information《计算概论》课程 第十九讲 C 程序设计语言应用
Java 高级技术 课程第二讲 Java 语言的面向对象特性 (3) 李戈 北京大学信息科学技术学院软件研究所 2010 年 3 月 21 日 进入一个新的主题 抽象类 vs. 接口 抽象类的引出 抽象类 现实世界中一些没有具体对象的纯粹抽象概念, 例如, 鸟 鱼 灯 树 动物 ; 抽象类用于建模现实世界中的纯粹抽象概念 ; 定义方法 : 使用保留字 abstract public abstract
More informationChapter 9: Objects and Classes
Fortran Algol Pascal Modula-2 BCPL C Simula SmallTalk C++ Ada Java C# C Fortran 5.1 message A B 5.2 1 class Vehicle subclass Car object mycar public class Vehicle extends Object{ public int WheelNum
More informationJavaIO.PDF
O u t p u t S t ream j a v a. i o. O u t p u t S t r e a m w r i t e () f l u s h () c l o s e () public abstract void write(int b) throws IOException public void write(byte[] data) throws IOException
More informationOOP with Java 通知 : Project 2 提交时间 : 3 月 14 日晚 9 点 另一名助教 : 王桢
OOP with Java Yuanbin Wu cs@ecnu OOP with Java 通知 : Project 2 提交时间 : 3 月 14 日晚 9 点 另一名助教 : 王桢 Email: 51141201063@ecnu.cn 复习 : Java 类型 基本类型 boolean, char, 封装 (wrappers) 类 (class) 定义 class MyType { int i;
More informationOOP with Java 通知 : Project 2 提交时间 : 3 月 15 日晚 9 点
OOP with Java Yuanbin Wu cs@ecnu OOP with Java 通知 : Project 2 提交时间 : 3 月 15 日晚 9 点 复习 : Java 类型 基本类型 boolean, char, 封装 (wrappers) 类 (class) 定义 class MyType { int i; double d; 数据 (Fields) char c; void set(double
More information(procedure-oriented)?? 2
1 (procedure-oriented)?? 2 (Objected-Oriented) (class)? (method)? 3 : ( 4 ???? 5 OO 1966 Kisten Nygaard Ole-Johan Dahl Simula Simula 爲 6 Smalltalk Alan Kay 1972 PARC Smalltalk Smalltalk 爲 Smalltalk 爲 Smalltalk
More informationViu_Cover
January 2017 Program Highlights SE7EN 2 SE7EN 2 (Colin)(Thor) (Hailey)(Dixon) (Renci) (Hidy) # 1 7-3 11 21:30-22:30 960 * $598,000 * $280,000 179 seven SE7EN7 A320 100 SE7EN ViuTV (Advance Commitment Scheme)
More informationViu_Cover
November 2016 Program Highlights G1 1O1O 1O G1 V Henry Chan show (Hidy) Charlene Houghton MMA G-1 G-1 # 11 7-8 22:00-23:00 260 * $380,000 * $185,000 ViuTV (Advance Commitment Scheme) # 10 22-11 13 22:30-23:30
More informationKillTest 质量更高 服务更好 学习资料 半年免费更新服务
KillTest 质量更高 服务更好 学习资料 http://www.killtest.cn 半年免费更新服务 Exam : 310-055Big5 Title : Sun Certified Programmer for the Java 2 Platform.SE 5.0 Version : Demo 1 / 22 1. 11. public static void parse(string str)
More informationJava java.lang.math Java Java.util.Random : ArithmeticException int zero = 0; try { int i= 72 / zero ; }catch (ArithmeticException e ) { // } 0,
http://debut.cis.nctu.edu.tw/~chi Java java.lang.math Java Java.util.Random : ArithmeticException int zero = 0; try { int i= 72 / zero ; }catch (ArithmeticException e ) { // } 0, : POSITIVE_INFINITY NEGATIVE_INFINITY
More informationMicrosoft Word - 物件導向編程精要.doc
Essential Object-Oriented Programming Josh Ko 2007.03.11 object-oriented programming C++ Java OO class object OOP Ruby duck typing complexity abstraction paradigm objects objects model object-oriented
More informationjavaexample-02.pdf
n e w. s t a t i c s t a t i c 3 1 3 2 p u b l i c p r i v a t e p r o t e c t e d j a v a. l a n g. O b j e c t O b j e c t Rect R e c t x 1 y 1 x 2 y 2 R e c t t o S t r i n g ( ) j a v a. l a n g. O
More informationEJB-Programming-3.PDF
:, JBuilder EJB 2.x CMP EJB Relationships JBuilder EJB Test Client EJB EJB Seminar CMP Entity Beans Value Object Design Pattern J2EE Design Patterns Value Object Value Object Factory J2EE EJB Test Client
More informationChapter 9: Objects and Classes
Java application Java main applet Web applet Runnable Thread CPU Thread 1 Thread 2 Thread 3 CUP Thread 1 Thread 2 Thread 3 ,,. (new) Thread (runnable) start( ) CPU (running) run ( ) blocked CPU sleep(
More informationStrings
Polymorphism and Virtual Functions Cheng-Chin Chiang Virtual Function Basics 多 型 (Polymorphism) 賦 予 一 個 函 數 多 種 意 涵, 存 在 於 同 一 類 別 之 內 祖 先 類 別 與 後 代 類 別 間 物 件 導 向 程 式 設 計 基 本 原 理 虛 擬 函 數 (Virtual Function)
More information建模与图形思考
C03_c 基 於 軟 硬 整 合 觀 點 JNI: 从 C 调 用 Java 函 数 ( c) By 高 煥 堂 3 How-to: 基 於 軟 硬 整 合 觀 點 从 C 调 用 Java 函 数 如 果 控 制 点 摆 在 本 地 C 层, 就 会 常 常 1. 从 本 地 C 函 数 去 调 用 Java 函 数 ; 2. 从 本 地 C 函 数 去 存 取 Java 层 对 象 的 属 性
More informationuntitled
1 Outline 數 料 數 數 列 亂數 練 數 數 數 來 數 數 來 數 料 利 料 來 數 A-Z a-z _ () 不 數 0-9 數 不 數 SCHOOL School school 數 讀 school_name schoolname 易 不 C# my name 7_eleven B&Q new C# (1) public protected private params override
More information附录J:Eclipse教程
附 录 J:Eclipse 教 程 By Y.Daniel Liang 该 帮 助 文 档 包 括 以 下 内 容 : Eclipse 入 门 选 择 透 视 图 创 建 项 目 创 建 Java 程 序 编 译 和 运 行 Java 程 序 从 命 令 行 运 行 Java Application 在 Eclipse 中 调 试 提 示 : 在 学 习 完 第 一 章 后 使 用 本 教 程 第
More information<4D6963726F736F667420506F776572506F696E74202D20332D322E432B2BC3E6CFF2B6D4CFF3B3CCD0F2C9E8BCC6A1AAD6D8D4D8A1A2BCCCB3D0A1A2B6E0CCACBACDBEDBBACF2E707074>
程 序 设 计 实 习 INFO130048 3-2.C++ 面 向 对 象 程 序 设 计 重 载 继 承 多 态 和 聚 合 复 旦 大 学 计 算 机 科 学 与 工 程 系 彭 鑫 pengxin@fudan.edu.cn 内 容 摘 要 方 法 重 载 类 的 继 承 对 象 引 用 和 拷 贝 构 造 函 数 虚 函 数 和 多 态 性 类 的 聚 集 复 旦 大 学 计 算 机 科 学
More informationMicrosoft Word - 01.DOC
第 1 章 JavaScript 简 介 JavaScript 是 NetScape 公 司 为 Navigator 浏 览 器 开 发 的, 是 写 在 HTML 文 件 中 的 一 种 脚 本 语 言, 能 实 现 网 页 内 容 的 交 互 显 示 当 用 户 在 客 户 端 显 示 该 网 页 时, 浏 览 器 就 会 执 行 JavaScript 程 序, 用 户 通 过 交 互 式 的
More information<4D6963726F736F667420576F7264202D2032303136A67EA977B4C1A5BFA6A1A6D2B8D5B3F8A6D2C2B2B3B92E646F6378>
華 語 文 能 力 測 驗 Test of Chinese as a Foreign Language (TOCFL) 2016 年 定 期 正 式 考 試 報 考 簡 章 聽 力 測 驗 / 閱 讀 測 驗 / 口 語 測 驗 / 寫 作 測 驗 TOCFL Guidelines for 2016 Listening/Reading/Speaking/Writing 中 文 版 教 育 部 國 家
More information(6) 要 求 付 款 管 理 员 从 预 订 表 中 查 询 距 预 订 的 会 议 时 间 两 周 内 的 预 定, 根 据 客 户 记 录 给 满 足 条 件 的 客 户 发 送 支 付 余 款 要 求 (7) 支 付 余 款 管 理 员 收 到 客 户 余 款 支 付 的 通 知 后, 检
2016 年 上 半 年 软 件 设 计 师 考 试 真 题 ( 下 午 题 ) 下 午 试 题 试 题 一 ( 共 15 分 ) 阅 读 下 列 说 明 和 图, 回 答 问 题 1 至 问 题 4, 将 解 答 填 入 答 题 纸 的 对 应 栏 内 说 明 某 会 议 中 心 提 供 举 办 会 议 的 场 地 设 施 和 各 种 设 备, 供 公 司 与 各 类 组 织 机 构 租 用 场
More informationMicrosoft PowerPoint - plan08.ppt
程 序 设 计 语 言 原 理 Principle of Programming Languages 裘 宗 燕 北 京 大 学 数 学 学 院 2012.2~2012.6 8. 面 向 对 象 为 什 么 需 要 面 向 对 象? OO 语 言 的 发 展 面 向 对 象 的 基 本 概 念 封 装 和 继 承 初 始 化 和 终 结 处 理 动 态 方 法 约 束 多 重 继 承 总 结 2012
More information基于ECO的UML模型驱动的数据库应用开发1.doc
ECO UML () Object RDBMS Mapping.Net Framework Java C# RAD DataSetOleDbConnection DataGrod RAD Client/Server RAD RAD DataReader["Spell"].ToString() AObj.XXX bug sql UML OR Mapping RAD Lazy load round trip
More informationJava Access 5-1 Server Client Client Server Server Client 5-2 DataInputStream Class java.io.datainptstream (extends) FilterInputStream InputStream Obj
Message Transition 5-1 5-2 DataInputStream Class 5-3 DataOutputStream Class 5-4 PrintStream Class 5-5 (Message Transition) (Exercises) Java Access 5-1 Server Client Client Server Server Client 5-2 DataInputStream
More information3.1 num = 3 ch = 'C' 2
Java 1 3.1 num = 3 ch = 'C' 2 final 3.1 final : final final double PI=3.1415926; 3 3.2 4 int 3.2 (long int) (int) (short int) (byte) short sum; // sum 5 3.2 Java int long num=32967359818l; C:\java\app3_2.java:6:
More information非 洲 之 心 與 來 自 北 美 的 成 功 商 人 正 在 合 作 開 發 迦 南 美 地, 他 們 和 來 自 肯 亞 史 瓦 濟 蘭 的 傑 出 經 驗 豐 富 且 受 過 教 育 的 業 務 人 員 一 起 工 作, 一 同 創 造 一 個 獨 特 的 量 身 訂 造 的 組 織, 去 滿
台 灣 非 洲 之 心 (Heart for Africa, TAIWAN) 史 瓦 濟 蘭 國 際 聯 合 志 工 體 驗 營 (2012. July.05 July.18) 14 天 台 灣 非 洲 之 心 (Heart for Africa, TAIWAN),2010 年 5 月 25 日 成 立, 這 一 天 是 國 際 非 洲 日, 也 是 繼 美 國 非 洲 之 心 加 拿 大 非 洲
More information模板
制作人 : 张刚 目录 类和对象 面向对象程序设计基本特征 类的声明 构造方法 成员变量和方法 封装 继承 多态 包 访问控制 final static 抽象类和接口 内部类 沈阳工业大学软件学院 Java 课程教研组 Page 2 核心知识点 类 对象 三个基本特征 类的基本结构 成员变量 构造方法 成员方法 类实例 对象创建和操作 沈阳工业大学软件学院 Java 课程教研组 Page 3 1.
More informationuntitled
1 Outline 料 類 說 Tang, Shih-Hsuan 2006/07/26 ~ 2006/09/02 六 PM 7:00 ~ 9:30 聯 ives.net@gmail.com www.csie.ntu.edu.tw/~r93057/aspnet134 度 C# 力 度 C# Web SQL 料 DataGrid DataList 參 ASP.NET 1.0 C# 例 ASP.NET 立
More information電機工程系認可證照清單 2011/7/1
南 台 科 技 大 學 電 機 工 程 系 專 業 證 照 課 程 實 施 要 點 96 年 10 月 05 日 系 務 會 議 通 過 100 年 06 月 30 日 系 務 會 議 修 正 通 過 101 年 06 月 21 日 系 務 會 議 修 正 通 過 一 本 系 為 提 升 學 生 的 專 業 技 能, 特 訂 定 本 辦 法 二 實 施 對 象 : 本 系 日 間 部 96 學 年
More informationIoC容器和Dependency Injection模式.doc
IoC Dependency Injection /Martin Fowler / Java Inversion of Control IoC Dependency Injection Service Locator Java J2EE open source J2EE J2EE web PicoContainer Spring Java Java OO.NET service component
More informationFun Time (1) What happens in memory? 1 i n t i ; 2 s h o r t j ; 3 double k ; 4 char c = a ; 5 i = 3; j = 2; 6 k = i j ; H.-T. Lin (NTU CSIE) Referenc
References (Section 5.2) Hsuan-Tien Lin Deptartment of CSIE, NTU OOP Class, March 15-16, 2010 H.-T. Lin (NTU CSIE) References OOP 03/15-16/2010 0 / 22 Fun Time (1) What happens in memory? 1 i n t i ; 2
More informationMicrosoft Word - 先玉335 copy.doc
http://news.xinhuanet.com/herald/2010-09/21/c_13522940.htm 2010-09-21 12:11:10 335 335 PH4CV 3 10 300 50 20 100 5 8 5 8 20 16 10 4 10 1/3 4 3 4 2 22 8 60 50 6 13 7 21 21 13 1 13 10 2 9 100 80 10 70 335
More information(TestFailure) JUnit Framework AssertionFailedError JUnit Composite TestSuite Test TestSuite run() run() JUnit
Tomcat Web JUnit Cactus JUnit Java Cactus JUnit 26.1 JUnit Java JUnit JUnit Java JSP Servlet JUnit Java Erich Gamma Kent Beck xunit JUnit boolean JUnit Java JUnit Java JUnit Java 26.1.1 JUnit JUnit How
More informationJava 1 Java String Date
JAVA SCJP Java 1 Java String Date 1Java 01 Java Java 1995 Java Java 21 Java Java 5 1-1 Java Java 1990 12 Patrick Naughton C++ C (Application Programming Interface API Library) Patrick Naughton NeXT Stealth
More information9, : Java 19., [4 ]. 3 Apla2Java Apla PAR,Apla2Java Apla Java.,Apla,,, 1. 1 Apla Apla A[J ] Get elem (set A) A J A B Intersection(set A,set B) A B A B
25 9 2008 9 M ICROEL ECTRON ICS & COMPU TER Vol. 25 No. 9 September 2008 J ava 1,2, 1,2, 1,2 (1, 330022 ; 2, 330022) :,. Apla - Java,,.. : PAR ;Apla - Java ; ;CMP ; : TP311 : A : 1000-7180 (2008) 09-0018
More informationMicrosoft PowerPoint - L17_Inheritance_v4.pptx
C++ Programming Lecture 17 Wei Liu ( 刘 威 ) Dept. of Electronics and Information Eng. Huazhong University of Science and Technology May. 2015 Lecture 17 Chapter 20. Object-Oriented Programming: Inheritance
More information融通开放式基金月刊(2009年4月).doc
2009.4 2009.4 2009.4 1 2009 3. 2009.4 3 18 1.2 3000 7500 2 2009.4 3 2009.4 4 2009.4 3 A 2 2400 3 A 17.60% 4 A 1 4 2 3 1.89 A 1 A 5 2009.4 6 2009.4 7 2009.4 8 2009.4 9 2009.4 10 2009.4 11 2009.4 12 2009.4
More informationMicrosoft Word - 特种水产饲料行业研究报告.docx
特 种 水 产 饲 料 行 业 研 究 报 告 作 者 : 冯 锐 一 行 业 基 本 情 况 特 种 水 产 饲 料 行 业 是 市 场 充 分 竞 争 行 业, 行 业 集 中 度 不 高 且 产 品 区 域 化 特 征 较 为 明 显 根 据 中 国 证 监 会 颁 布 的 上 市 公 司 行 业 分 类 指 引, 该 类 属 于 大 类 C 制 造 业 之 中 类 C0101 粮 食 及 饲
More information1.5招募说明书(草案)
PUBLIC 2014 1 PUBLIC - 1 2014 1 PUBLIC - 2 2014 1 PUBLIC - 3 2014 1 PUBLIC - 4 2014 1 PUBLIC - 5 2014 1 PUBLIC - 6 2014 1 PUBLIC - 7 2014 1 PUBLIC - 8 2014 1 PUBLIC - 9 2014 1 PUBLIC - 10 2014 1 PUBLIC
More information2. AOP 底层技术实现 小风 Java 实战系列教程 关键词 : 代理模式 代理模型分为两种 : 1) 接口代理 (JDK 动态代理 ) 2) 子类代理 (Cglib 子类代理 ) 需求 :CustomerService 业务类, 有 save,update 方法, 希望在 save,updat
本章学习目标 小风 Java 实战系列教程 AOP 思想概述 AOP 底层技术实现 AOP 术语介绍 SpringAOP 的 XML 方式 HelloWorld SpringAOP 的 XML 方式配置细节 SpringAOP 的注解方式 SpringAOP 的零配置方式 1. AOP 思想概述 1.1. AOP 思想简介 1.2. AOP 的作用 2. AOP 底层技术实现 小风 Java 实战系列教程
More informationKillTest 质量更高 服务更好 学习资料 半年免费更新服务
KillTest 质量更高 服务更好 学习资料 http://www.killtest.cn 半年免费更新服务 Exam : 1Z0-854 Title : Java Standard Edition 5 Programmer Certified Professional Upgrade Exam Version : Demo 1 / 12 1.Given: 20. public class CreditCard
More informationMicrosoft Word - Final Exam Review Packet.docx
Do you know these words?... 3.1 3.5 Can you do the following?... Ask for and say the date. Use the adverbial of time correctly. Use Use to ask a tag question. Form a yes/no question with the verb / not
More informationJBuilder Weblogic
JUnit ( bliu76@yeah.net) < >6 JUnit Java Erich Gamma Kent Beck JUnit JUnit 1 JUnit 1.1 JUnit JUnit java XUnit JUnit 1.2 JUnit JUnit Erich Gamma Kent Beck Erich Gamma Kent Beck XP Extreme Programming CRC
More information<4D6963726F736F667420576F7264202D20C8EDC9E82DCFC2CEE7CCE22D3039C9CF>
全 国 计 算 机 技 术 与 软 件 专 业 技 术 资 格 ( 水 平 考 试 2009 年 上 半 年 软 件 设 计 师 下 午 试 卷 ( 考 试 时 间 14:00~16:30 共 150 分 钟 请 按 下 述 要 求 正 确 填 写 答 题 纸 1. 在 答 题 纸 的 指 定 位 置 填 写 你 所 在 的 省 自 治 区 直 辖 市 计 划 单 列 市 的 名 称 2. 在 答
More informationMicrosoft Word - A201103-528_1299547322.doc
5 10 15 20 25 30 基 于 Android 平 台 的 人 机 交 互 的 研 究 与 实 现 郁 亚 男 ( 北 京 邮 电 大 学 软 件 学 院, 北 京 100876) 摘 要 : 随 着 计 算 的 发 展, 计 算 变 得 越 来 越 自 由, 在 资 源 使 用 方 面 也 越 来 越 灵 活 移 动 终 端 由 于 无 线 通 信 网 络 传 输 速 率 的 提 高,
More information建模与图形思考
F06_c 观摩 :ContentProvider 基於軟硬整合觀點 架构與 DB 引擎移植方法 ( c) By 高煥堂 4 通用性基类 ContentProvider 基於軟硬整合觀點 的使用范例 刚才的范例里, 我们直接使用 DataPersist 类的接口来与 SQLite 沟通 本节将替 DataPersist 配上 ContentProvider 基类, 让 Client 能透过 ContentProvider
More informationThinking in Java 3rd Edition
致读者 : 我从 2002 年 7 月开始翻译这本书, 当时还是第二版 但是翻完前言和介绍部分后,chinapub 就登出广告, 说要出版侯捷的译本 于是我中止了翻译, 等着侯先生的作品 我是第一时间买的这本书, 但是我失望了 比起第一版, 我终于能看懂这本书了, 但是相比我的预期, 它还是差一点 所以当 Bruce Eckel 在他的网站上公开本书的第三版的时候, 我决定把它翻译出来 说说容易,
More informationLek Yuen General Out-Patient Clinic 9 ( : ) G/F, Lek Yuen Health Centre, 9 Lek Yuen Street, Shatin (Tel ) Monday to Friday Saturday
Lek Yuen General Out-Patient Clinic 9 ( : 2692 8730 G/F, Lek Yuen Health Centre, 9 Lek Yuen Street, Shatin (Tel. 2692 8730 and Sunday ( NTEC General Out-Patient Clinic Timetable (Shatin District Service
More information2005 ( )... 1 2005... 5 2005... 10 2005... 16 2005... 20 2005... 23 2005 ( )... 30 200 5... 37 2005... 43 2005... 47 2005... 52 2005 ( )... 58 2005... 63 2005 ( )... 68 2005 (WA T)... 73 2005 ( ) 2005
More information本章学习目标 小风 Java 实战系列教程 SpringMVC 简介 SpringMVC 的入门案例 SpringMVC 流程分析 配置注解映射器和适配器 注解的使用 使用不同方式的跳转页面 1. SpringMVC 简介 Spring web mvc
本章学习目标 SpringMVC 简介 SpringMVC 的入门案例 SpringMVC 流程分析 配置注解映射器和适配器 配置视图解析器 @RequestMapping 注解的使用 使用不同方式的跳转页面 1. SpringMVC 简介 Spring web mvc 和 Struts2 都属于表现层的框架, 它是 Spring 框架的一部分, 我们可 以从 Spring 的整体结构中看得出来 :
More informationMicrosoft Word - ch04三校.doc
4-1 4-1-1 (Object) (State) (Behavior) ( ) ( ) ( method) ( properties) ( functions) 4-2 4-1-2 (Message) ( ) ( ) ( ) A B A ( ) ( ) ( YourCar) ( changegear) ( lowergear) 4-1-3 (Class) (Blueprint) 4-3 changegear
More informationuntitled
1 7 7.1 7.2 7.3 7.4 7.5 2 7.1 VFT virtual 7.1 3 1 1. 2. public protected public 3. VFT 4. this const volatile 4 2 5. ( ) ( ) 7.1 6. no-static virtual 7.2 7. inline 7.3 5 3 8. this this 9. ( ) ( ) delete
More informationebook55-13
1 3 C + + C C + + 13.1 X 256 C + + p r i v a t e p u b l i c p e r m u t e () X X Y 13.2 Y Y X 13 257 Y X Y X X m a i n () s i z e o f ( Y s i z e o f ( X ) p u b l i c p r i v a t e p u b l i c p r i
More informationuntitled
,, : ; ; ; ; ; ;,, : ( ) : : : ( ) : : : 6 1 6 1 1 : ,,,,,,,,, :,,,,,,, ,,,,,,,,,, ;, ;,,,,,,,,, : 1. 2.,,, 3.,,,,,,,, ;,,,,, : 1.,, 2.,, ;,,,, 3.,,,,,, 4.,,, ;,,, ;,,,,,,,,,,,,,, ;,,,,,,,, : 1. :,,,
More information<4D6963726F736F667420506F776572506F696E74202D20B5DA3035D5C220C3E6CFF2B6D4CFF3B8DFBCB6B3CCD0F2C9E8BCC6>
Java 程 序 设 计 教 学 课 件 河 南 农 业 大 学 信 管 学 院 计 算 机 系 河 南 农 业 大 学 信 管 学 院 计 算 机 系 高 级 语 言 程 序 设 计 课 程 组 第 5 章 面 向 对 象 高 级 程 序 设 计 主 要 内 容 5.1 继 承 5.2 多 态 性 5.3 抽 象 类 和 抽 象 方 法 5.4 接 口 5.5 内 部 类 和 匿 名 类 5.1
More informationRef: 1516-19A ( 三 ) 升 留 級 準 則 本 校 對 學 生 的 學 術 水 平 有 嚴 格 要 求, 學 生 必 須 達 到 指 定 標 準, 才 可 升 級 細 則 如 下 : 初 中 升 級 條 件 ( 全 年 總 成 績 須 符 合 以 下 各 項, 方 准 予 升 級 )
Lung Kong WFSL Lau Wong Fat Secondary School 世 界 龍 岡 學 校 劉 皇 發 中 學 2015-2016 第 十 九 號 A 家 長 通 告 ( 中 一 學 生 適 用 ) 本 通 告 已 上 載 本 校 網 頁 : www.lwfss.edu.hk 如 有 修 訂, 以 網 上 版 本 為 準 敬 啟 者 : 茲 有 下 列 事 項, 請 詳 閱,
More information1: public class MyOutputStream implements AutoCloseable { 3: public void close() throws IOException { 4: throw new IOException(); 5: } 6:
Chapter 15. Suppressed Exception CH14 Finally Block Java SE 7 try-with-resources JVM cleanup try-with-resources JVM cleanup cleanup Java SE 7 Throwable getsuppressed Throwable[] getsuppressed() Suppressed
More information1 Framework.NET Framework Microsoft Windows.NET Framework.NET Framework NOTE.NET NET Framework.NET Framework 2.0 ( 3 ).NET Framework 2.0.NET F
1 Framework.NET Framework Microsoft Windows.NET Framework.NET Framework NOTE.NET 2.0 2.0.NET Framework.NET Framework 2.0 ( 3).NET Framework 2.0.NET Framework ( System ) o o o o o o Boxing UnBoxing() o
More informationD C 93 2
D9223468 3C 93 2 Java Java -- Java UML Java API UML MVC Eclipse API JavadocUML Omendo PSPPersonal Software Programming [6] 56 8 2587 56% Java 1 epaper(2005 ) Java C C (function) C (reusability) eat(chess1,
More information使用MapReduce读取XML文件
使用 MapReduce 读取 XML 文件 XML( 可扩展标记语言, 英语 :extensible Markup Language, 简称 : XML) 是一种标记语言, 也是行业标准数据交换交换格式, 它很适合在系统之间进行数据存储和交换 ( 话说 Hadoop H ive 等的配置文件就是 XML 格式的 ) 本文将介绍如何使用 MapReduce 来读取 XML 文件 但是 Had oop
More information提问袁小兵:
C++ 面 试 试 题 汇 总 柯 贤 富 管 理 软 件 需 求 分 析 篇 1. STL 类 模 板 标 准 库 中 容 器 和 算 法 这 部 分 一 般 称 为 标 准 模 板 库 2. 为 什 么 定 义 虚 的 析 构 函 数? 避 免 内 存 问 题, 当 你 可 能 通 过 基 类 指 针 删 除 派 生 类 对 象 时 必 须 保 证 基 类 析 构 函 数 为 虚 函 数 3.
More information編 者 的 話 甄 選 改 變 大 學 與 高 中 職 校 園 亞 洲 國 家 強 調 以 筆 試 作 為 重 要 入 學 憑 據, 歐 美 國 家 則 傾 向 學 校 選 學 生 和 學 生 選 科 系 以 美 國 史 丹 佛 大 學 為 例, 全 面 採 取 個 人 申 請 入 學 制, 每 年
Higher Education,Technological & Vocational Education Newsletter 075 電 子 報 網 址 :www.news.high.edu.tw 102.03.27 歡 迎 訂 閱 國 內 郵 資 已 付 中 華 郵 政 北 臺 字 第 6215 號 雜 誌 局 版 北 誌 字 第 1887 號 執 照 登 記 為 雜 誌 交 寄 平 信 甄
More informationMicrosoft Word - Broker.doc
Broker 模式 采用 broker 模式对分布式计算进行简单模拟 系统在一个进程内模拟分布式环境, 因此不涉及网络编程和进程间通信,Broker 通过本地函数调用的方式实现 request 和 response 的转发 采用 broker 模式对分布式计算进行简单的模拟, 要求如下 : 设计四个 server, 一个 server 接收两个整数, 求和并返回结果, 一个 server 接收两个整数,
More information1:30 PM Site Visit 参 观 1 Session 4 课 程 4 Session 6 课 程 6 Site visit 参 观 2 Hotel Check-in and have a brief ur of downwn Vancouver 入 住 酒 店, 简 单 参 观 温 哥
部 分 培 训 项 目 样 例 1. 三 周 现 代 公 共 管 理 与 人 力 资 源 开 发 专 题 培 训 项 目 Week 1 第 一 周 Time Sunday 周 日 Monday 周 一 Tuesday 周 二 Wednesday 周 三 Thursday 周 四 Friday 周 五 Saturday 周 六 第 一 天 第 二 天 第 三 天 第 四 天 第 五 天 第 六 天 第
More informationMicrosoft Word - 第5章.doc
第 5 章 面向对象编程 除了基本的类和对象,Java 语言的面向对象编程还包括抽象类 接口 内部类及包等高级特性 通过对这些高级特性的支持,Java 语言全面实现了面向对象的编程 本章将进一步深入介绍 Java 语言面向对象编程方面的知识 5.1 类的三大特性 第 4 章介绍了有关类定义的基本知识 面向对象中的类还具有封装 继承与多态的特性, 这也是面向对象编程所具有的重要特点 Java 语言对类的封装
More informationGuava学习之Resources
Resources 提供提供操作 classpath 路径下所有资源的方法 除非另有说明, 否则类中所有方法的参数都不能为 null 虽然有些方法的参数是 URL 类型的, 但是这些方法实现通常不是以 HTTP 完成的 ; 同时这些资源也非 classpath 路径下的 下面两个函数都是根据资源的名称得到其绝对路径, 从函数里面可以看出,Resources 类中的 getresource 函数都是基于
More informationjava2d-4.PDF
75 7 6 G r a d i e n t P a i n t B a s i c S t r o k e s e t P a i n t ( ) s e t S t o r k e ( ) import java.awt.*; import java.awt.geom.*; public class PaintingAndStroking extends ApplicationFrame { public
More informationImport Sailing Schedule DK - Signe.xlsx
LCL Import Sailing schedules DHL Global Forwarding Denmark HONG KONG Monday 12:00 Tuesday 17:00 Saturday ETA Aarhus ETA København EVER LISSOME 07-jan 08-jan 10-jan 10-feb 31 14-feb 35 HELSINKI BRIGDE 12-jan
More information1 4 1.1 4 1.2..4 2..4 2.1..4 3.4 3.1 Java.5 3.1.1..5 3.1.2 5 3.1.3 6 4.6 4.1 6 4.2.6 5 7 5.1..8 5.1.1 8 5.1.2..8 5.1.3..8 5.1.4..9 5.2..9 6.10 6.1.10
Java V1.0.1 2007 4 10 1 4 1.1 4 1.2..4 2..4 2.1..4 3.4 3.1 Java.5 3.1.1..5 3.1.2 5 3.1.3 6 4.6 4.1 6 4.2.6 5 7 5.1..8 5.1.1 8 5.1.2..8 5.1.3..8 5.1.4..9 5.2..9 6.10 6.1.10 6.2.10 6.3..10 6.4 11 7.12 7.1
More informationThe Embedded computing platform
嵌入式系統及實驗 Embedded System and Experiment 詹曉龍 長庚大學電機系 Java 的類別與物件 : 宣告類別 建構子 public class Customer { private String name; private String address; // Customer 類別宣告 // 成員資料 public int age; // 建構子 : 使用參數設定成員資料初始值
More information第八章类和对象的扩展 实验目的 (1) 类的继承 a. 掌握父类及子类的关系及创建方法 b. 掌握上转型对象的使用方法 c. 掌握子类对象创建过程中与父类构造方法的关系, 及 super 关键字的用法 (2) 多态与接口 a. 掌握抽象类与抽象方法的概念 b. 掌握多态的实现原理及方法 c. 了解成
第八章类和对象的扩展 实验目的 (1) 类的继承 a. 掌握父类及子类的关系及创建方法 b. 掌握上转型对象的使用方法 c. 掌握子类对象创建过程中与父类构造方法的关系, 及 super 关键字的用法 (2) 多态与接口 a. 掌握抽象类与抽象方法的概念 b. 掌握多态的实现原理及方法 c. 了解成员变量的隐藏 d. 掌握接口的设计方法 实验范例 例 1:( 继承 ) (1) 编写一个圆类 Circle,
More information内 容 提 要 将 JAVA 开 发 环 境 迁 移 到 Linux 系 统 上 是 现 在 很 多 公 司 的 现 实 想 法, 而 在 Linux 上 配 置 JAVA 开 发 环 境 是 步 入 Linux 下 JAVA 程 序 开 发 的 第 一 步, 本 文 图 文 并 茂 地 全 程 指
内 容 提 要 将 JAVA 开 发 环 境 迁 移 到 Linux 系 统 上 是 现 在 很 多 公 司 的 现 实 想 法, 而 在 Linux 上 配 置 JAVA 开 发 环 境 是 步 入 Linux 下 JAVA 程 序 开 发 的 第 一 步, 本 文 图 文 并 茂 地 全 程 指 导 你 搭 建 Linux 平 台 下 的 JAVA 开 发 环 境, 包 括 JDK 以 及 集
More information管道建模基础.ppt
AVEVA 2004.11.4 Pdms (database hierarchy) (PipeworkModelling) PIPE WORLD BRANCH PDMS FLANGE,Elbow.. SITE Pipe routing is probably the activity that consumes most time on any large project and it is also
More information