extend
|
|
- 本 匡
- 4 years ago
- Views:
Transcription
1 (object oriented) Encapsulation Inheritance Polymorphism Dynamic Binding (base class) (derived class) 1
2 class Base { int I; void X(); void Y(); class Derived: public Base { private: int j; void z(); Derived j z() I X() Y() 2
3 class OLD { virtual void Action(); void OLD::Action(){ printf( This is an old class ); class New: public OLD { void Action(); void NEW::Action(){ printf( This is NEW class ); Action() New Action class Base{ virtual void Initialize(); void Base:: Initialize(){ /* class Derived: public Base{ void Initialize(); void Derived:: Initialize(){ Base::Initialize(); /* Base Initialize */ Derived Initialize */ 3
4 protected public, protected, private private protected public, protected, private public protected private 4
5 public class : public { /* */ public public protected public protected private class : private { /* */ private private public protected private private 5
6 public private public public private protected protected private private - class upcounter{ protected: int value; void set_val(int v) { value=v; void up() { value++; int get_val() { return value; 1 class counter: public upcounter{ void down() { value--; // upcounter a; counter b; a.set_val(5); b.set_val(8); for (int i=0;i<5;i++) { a.up(); b.up(); // for (i=0;i<10;i++) b.down(); cout << Value of counter a= << a.get_val() << \n ; // 10 cout << Value of counter b= ; // 3 6
7 - #include <math.h> class circle{ /* */ protected: double r; void set_radius(double a) { r=a; double area(){ return 4*atan(1)*r*r; class cylinder: public circle{ private: double h; void set_height(double a) { h=a; double area(){ double pi=4*atan(1); return pi*r*r*2+2*pi*r*h; circle c; cylinder b; c.set_radius(2); b.set_radius(2); b.set_height(2); cout << "Area of c ="<< c.area() <<"\n"; cout << "Surface of b="<< b.area() <<"\n"; Area of c= Surface of b= #include <stdlib.h> #include <conio.h> #include <time.h> - class Rockbox{ protected: int number; Rockbox(){ srand((unsigned)time(null)); number=1; void rock(){ number=rand()%9+1; int see(){ return number; class UnjustRock:public Rockbox{ void unjust(int); void UnjustRock::unjust(int no){ if ((no>=0)&&(no<=9)) number=n UnjustRock box1; cout << "; box1.rock(); cout<<box1.see()<<endl; cout<< "; box1.unjust(8); cout<<box1.see()<<endl; 7
8 #include <process.h> const int MAX=100; class Stack{ protected: int st[max]; int top; Stack(){ top=0; void push(int var){ st[++top]=var; int pop(){ return st[top--]; class Stack2:public Stack{ void push(int var); int pop(); - void Stack2::push( int var){ if (top<max) Stack::push(var); else { cout<<"\nerror:stack is full."; exit(1); int Stack2::pop(){ if (top>0) return Stack::pop(); else { cout<<"\n Error: Stack is empty."; exit(1); return -1; Stack2 s1; s1.push(110); s1.push(220); cout <<endl<<s1.pop(); // 220 cout <<endl<<s1.pop(); // 110 cout <<endl<<s1.pop(); ( ): ( ){ /* */ : Derived(int v): Base(v) 8
9 class Base{ Base(){ cout << In Base class\n ; class Derived: public Base{ Derived a; In Base class - #include <math.h> class vector2{ protected: double x,y; vector2(){x=0;y=0; vector2(double a, double b){ x=a; y=b; double len(){ return sqrt(x*x+y*y); class vector3: public vector2{ private: double z; vector3():vector2() {z=0; vector3(double a, double b, double c):vector2(a,b){ z=c; double len(){ return sqrt(x*x+y*y+z*z); vector2 p(3,-4); vector3 q(4,3,-5); cout << Length of point p= << p.len()<<endl; cout << Length of point q= << q.len()<<endl; 9
10 - class upcounter{ protected: int value; upcounter(){ value=0; upcounter(int v) { value=v; void up() { value++; int get_val() { return value; class counter: public upcounter{ counter():upcounter(){ counter(int v):upcounter(v) { void down() { value--; upcounter a(5); counter b(8); counter c; for (int i=0;i<5;i++) { a.up(); b.up(); for (i=0;i<10;i++) b.down(); cout << Value of counter a= <<a.get_val() << \n ; // 10 cout << Value of counter b= << b.get_val() << \n ; // 3 cout << "Value of counter c= " << c.get_val() <<"\n"; // 0 Step 1: Step 2: ( ): ( ){, ( ) 10
11 (1) class Base{ Base(){ cout << "Base class\n"; class Derived: public Base{ Derived():Base(){ Derived a; Base class Derived class // Derived(){ cout << "Derived class\n"; (2) class Base{ Base class Derived class 2 Base(){ cout << "Base class\n"; class Derived: public Base{ Derived(int j){ cout <<"Derived class " << j <<"\n"; Derived a(2); 11
12 (3) class Base{ Base(){ cout << "Base class\n"; Base(int j){ cout << "Base "<< j<<"\n"; class Derived: public Base{ Derived(int j):base (j){ cout <<"Derived class " << j <<"\n"; Derived a(2); Base 2 Derived class 2 (destructor) Step 1: Step 2: : class Base{ ~Base(){ cout<< In ~Base()\n ; class Derived: public Base{ ~Derived(){ cout<< In ~Derived()\n ; Derived p; In ~Derived() In ~Base() 12
13 (abstract class) (abstract class) ( ) (multiple inheritance) C++ (multiple inheritance) Derived Base1 Base2 Base 1 Base2 Base1 Base2 Derived 13
14 class : public 1, public 2 { private private : class Derived: public Base1, public Base2{ /* */ void set_grade(int n){ grade=n; #include <string.h> int get_grade(){ return grade; class man{ char name[20]; class student: public man, public cis{ int age; void disp(){ void set_name(char *p){ cout << Grade= <<grade<< \n ; strcpy(name,p); cout << Name= <<name<< \n ; char* get_name(){ return name; class cis{ // student john; protected: int grade; john.set_grade(1); john.set_name( John ); john.disp(); 14
15 - class A{ int x; void y(); class B{ int x; void y(); class C: public A, public B{ void set(); void C::set(){ x=0; // // y(); // :: :: : void C::set(){ A::x=0; B::y(); 15
16 class : public 1, public 2 : ( ): 1( ), 2( ) 1 2 class Base1{ Base1(){ cout<< Base 1\n ; class Base2{ Base2(){ cout<< Base 2\n ; class Derived: public Base1, public Base2{ Derived():Base1(),Base2(){ cout<< Derived class\n ; Derived a; Base 1 Base 2 Derived class 16
17 class : public 1, public 2 : ~ () 2 1 class Base1{ Base1(){ cout<<"in Base1\n"; ~Base1(){ cout<<"in ~Base1\n"; class Base2{ Base2(){ cout<<"in Base2\n"; ~Base2(){ cout<<"in ~Base2\n"; class Derived:public Base1, public Base2{ Derived():Base2(),Base1(){ cout << "In Derived\n"; ~Derived(){ cout << "In ~Derived\n"; Derived p; In Base1 In Base2 In Derived In ~Derived In ~Base2 In ~Base1 17
Strings
Inheritance Cheng-Chin Chiang Relationships among Classes A 類 別 使 用 B 類 別 學 生 使 用 手 機 傳 遞 訊 息 公 司 使 用 金 庫 儲 存 重 要 文 件 人 類 使 用 交 通 工 具 旅 行 A 類 別 中 有 B 類 別 汽 車 有 輪 子 三 角 形 有 三 個 頂 點 電 腦 內 有 中 央 處 理 單 元 A
More informationStrings
Polymorphism and Virtual Functions Cheng-Chin Chiang Virtual Function Basics 多 型 (Polymorphism) 賦 予 一 個 函 數 多 種 意 涵, 存 在 於 同 一 類 別 之 內 祖 先 類 別 與 後 代 類 別 間 物 件 導 向 程 式 設 計 基 本 原 理 虛 擬 函 數 (Virtual Function)
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 informationuntitled
(encapsulation) 例 類 說 類 料 來 料 information hiding 念 (inheritance) 來說 類 類 類 類 類 類 行 利 來 (polymorphism) 不 類 數 不 1 2 3 4 類 類 不 類 不 類 5 6 7 // virtual 不見了 #include #include using namespace
More informationuntitled
1 1.1 1.2 1.3 1.4 1.5 ++ 1.6 ++ 2 BNF 3 4 5 6 7 8 1.2 9 1.2 IF ELSE 10 1.2 11 1.2 12 1.3 Ada, Modula-2 Simula Smalltalk-80 C++, Objected Pascal(Delphi), Java, C#, VB.NET C++: C OOPL Java: C++ OOPL C# C++
More informationMicrosoft Word - chap10.doc
78 10. Inheritance in C++ 我 們 已 介 紹 了 物 件 導 向 程 式 的 第 一 個 主 要 特 性, 即 程 式 可 模 組 化 成 為 類 別 ( 物 件 ), 類 別 具 有 資 料 封 裝 的 特 性 接 下 來 我 們 要 介 紹 物 件 導 向 程 式 的 另 一 個 主 要 特 性, 那 就 是 類 別 具 有 繼 承 的 功 能 繼 承 就 是 重 複
More information新・解きながら学ぶJava
481! 41, 74!= 40, 270 " 4 % 23, 25 %% 121 %c 425 %d 121 %o 121 %x 121 & 199 && 48 ' 81, 425 ( ) 14, 17 ( ) 128 ( ) 183 * 23 */ 3, 390 ++ 79 ++ 80 += 93 + 22 + 23 + 279 + 14 + 124 + 7, 148, 16 -- 79 --
More informationuntitled
3 C++ 3.1 3.2 3.3 3.4 new delete 3.5 this 3.6 3.7 3.1 3.1 class struct union struct union C class C++ C++ 3.1 3.1 #include struct STRING { typedef char *CHARPTR; // CHARPTR s; // int strlen(
More informationChapter12 Derived Classes
继 承 -- 派 生 类 复 习 1. 有 下 面 类 的 说 明, 有 错 误 的 语 句 是 : class X { A) const int a; B) X(); C) X(int val) {a=2 D) ~X(); 答 案 :C 不 正 确, 应 改 成 X(int val) : a(2) { 2. 下 列 静 态 数 据 成 员 的 特 性 中, 错 误 的 是 A) 说 明 静 态 数
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第七讲 继承与多态
第 七 章 继 承 与 派 生 1 本 章 主 要 内 容 的 继 承 成 员 的 访 问 控 制 单 继 承 与 多 继 承 派 生 的 构 造 析 构 函 数 成 员 的 标 识 与 访 问 深 度 探 索 2 的 继 承 与 派 生 的 继 承 与 派 生 保 持 已 有 的 特 性 而 构 造 新 的 过 程 称 为 继 承 在 已 有 的 基 础 上 新 增 自 己 的 特 性 而 产 生
More information<4D6963726F736F667420506F776572506F696E74202D20332D322E432B2BC3E6CFF2B6D4CFF3B3CCD0F2C9E8BCC6A1AAD6D8D4D8A1A2BCCCB3D0A1A2B6E0CCACBACDBEDBBACF2E707074>
程 序 设 计 实 习 INFO130048 3-2.C++ 面 向 对 象 程 序 设 计 重 载 继 承 多 态 和 聚 合 复 旦 大 学 计 算 机 科 学 与 工 程 系 彭 鑫 pengxin@fudan.edu.cn 内 容 摘 要 方 法 重 载 类 的 继 承 对 象 引 用 和 拷 贝 构 造 函 数 虚 函 数 和 多 态 性 类 的 聚 集 复 旦 大 学 计 算 机 科 学
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 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(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 informationCC213
: (Ken-Yi Lee), E-mail: feis.tw@gmail.com 177 [P179] (1) - [P181] [P182] (2) - for [P183] (3) - switch [P184] [P187] [P189] [P194] 178 [ ]; : : int var; : int var[3]; var 2293620 var[0] var[1] 2293620
More informationC/C++程序设计 - 字符串与格式化输入/输出
C/C++ / Table of contents 1. 2. 3. 4. 1 i # include # include // density of human body : 1. 04 e3 kg / m ^3 # define DENSITY 1. 04 e3 int main ( void ) { float weight, volume ; int
More informationFY.DOC
高 职 高 专 21 世 纪 规 划 教 材 C++ 程 序 设 计 邓 振 杰 主 编 贾 振 华 孟 庆 敏 副 主 编 人 民 邮 电 出 版 社 内 容 提 要 本 书 系 统 地 介 绍 C++ 语 言 的 基 本 概 念 基 本 语 法 和 编 程 方 法, 深 入 浅 出 地 讲 述 C++ 语 言 面 向 对 象 的 重 要 特 征 : 类 和 对 象 抽 象 封 装 继 承 等 主
More informationC/C++ - 函数
C/C++ Table of contents 1. 2. 3. & 4. 5. 1 2 3 # include # define SIZE 50 int main ( void ) { float list [ SIZE ]; readlist (list, SIZE ); sort (list, SIZE ); average (list, SIZE ); bargragh
More informationMicrosoft Word - 97.01.30軟體設計第二部份範例試題_C++_ _1_.doc
電 腦 軟 體 設 計 乙 級 技 術 士 技 能 檢 定 術 科 測 試 範 例 試 題 (C++) 試 題 編 號 :11900-920201-4 審 定 日 期 : 94 年 7 月 1 日 修 訂 日 期 : 96 年 2 月 1 日 97 年 1 月 30 日 ( 第 二 部 份 ) 電 腦 軟 體 設 計 乙 級 技 術 士 技 能 檢 定 術 科 測 試 應 檢 參 考 資 料 壹 試
More information個 人 的 手, 拉 著 瞎 子 的 手 把 他 帶 往 村 外 的 時 候, 對 於 瞎 子 來 講, 那 個 人 的 手 和 耶 穌 的 手 有 沒 有 區 別? 沒 有! 為 什 麼 沒 有 區 別? 因 為 對 於 一 個 瞎 子 來 說, 手 和 耳 朵 就 是 他 接 觸 世 界, 瞭
課 目 : 講 道 法 學 生 : 楊 建 偉 老 師 : 汪 院 長 時 間 :2009 年 8 月 1 日 靈 命 三 階 ( 可 8:22-26) 在 四 部 福 音 書 中, 這 是 一 段 很 特 別 的 記 載 特 別 在 什 麼 地 方 呢? 是 不 是 特 別 在 耶 穌 基 督 對 一 個 病 人 的 醫 治? 不, 在 耶 穌 三 年 半 的 服 侍 當 中, 曾 經 醫 治 數
More information2013 C 1 # include <stdio.h> 2 int main ( void ) 3 { 4 int cases, a, b, i; 5 scanf ("%d", & cases ); 6 for (i = 0;i < cases ;i ++) 7 { 8 scanf ("%d %d
2013 18 ( ) 1. C pa.c, pb.c, 2. C++ pa.cpp, pb.cpp, Compilation Error cin scanf Time Limit Exceeded 1: A 5 B 5 C 5 D 5 E 5 F 5 1 2013 C 1 # include 2 int main ( void ) 3 { 4 int cases, a, b,
More information新版 明解C言語入門編
328, 4, 110, 189, 103, 11... 318. 274 6 ; 10 ; 5? 48 & & 228! 61!= 42 ^= 66 _ 82 /= 66 /* 3 / 19 ~ 164 OR 53 OR 164 = 66 ( ) 115 ( ) 31 ^ OR 164 [] 89, 241 [] 324 + + 4, 19, 241 + + 22 ++ 67 ++ 73 += 66
More information新・明解C言語入門編『索引』
!... 75!=... 48 "... 234 " "... 9, 84, 240 #define... 118, 213 #include... 148 %... 23 %... 23, 24 %%... 23 %d... 4 %f... 29 %ld... 177 %lf... 31 %lu... 177 %o... 196 %p... 262 %s... 242, 244 %u... 177
More informationuntitled
不 料 料 例 : ( 料 ) 串 度 8 年 數 串 度 4 串 度 數 數 9- ( ) 利 數 struct { ; ; 數 struct 數 ; 9-2 數 利 數 C struct 數 ; C++ 數 ; struct 省略 9-3 例 ( 料 例 ) struct people{ char name[]; int age; char address[4]; char phone[]; int
More information前言 C# C# C# C C# C# C# C# C# microservices C# More Effective C# More Effective C# C# C# C# Effective C# 50 C# C# 7 Effective vii
前言 C# C# C# C C# C# C# C# C# microservices C# More Effective C# More Effective C# C# C# C# Effective C# 50 C# C# 7 Effective vii C# 7 More Effective C# C# C# C# C# C# Common Language Runtime CLR just-in-time
More informationMicrosoft Word - 970617cppFinalSolution.doc
國 立 台 灣 海 洋 大 學 資 訊 工 程 系 C++ 程 式 設 計 期 末 考 參 考 答 案 姓 名 : 系 級 : 學 號 : 97/06/17 考 試 時 間 :10:00 12:10 試 題 敘 述 蠻 多 的, 看 清 楚 題 目 問 什 麼, 針 對 重 點 回 答 是 很 重 要 的 ; 不 確 定 的 請 一 定 要 當 場 提 出 來, 不 要 白 花 力 氣 在 誤 會
More informationC 1 # include <stdio.h> 2 int main ( void ) { 4 int cases, i; 5 long long a, b; 6 scanf ("%d", & cases ); 7 for (i = 0;i < cases ;i ++) 8 { 9
201 201 21 ( ) 1. C pa.c, pb.c, 2. C++ pa.cpp, pb.cpp Compilation Error long long cin scanf Time Limit Exceeded 1: A 1 B 1 C 5 D RPG 10 E 10 F 1 G II 1 1 201 201 C 1 # include 2 int main ( void
More informationC/C++ - 文件IO
C/C++ IO Table of contents 1. 2. 3. 4. 1 C ASCII ASCII ASCII 2 10000 00100111 00010000 31H, 30H, 30H, 30H, 30H 1, 0, 0, 0, 0 ASCII 3 4 5 UNIX ANSI C 5 FILE FILE 6 stdio.h typedef struct { int level ;
More informationC++ 程序设计 告别 OJ1 - 参考答案 MASTER 2019 年 5 月 3 日 1
C++ 程序设计 告别 OJ1 - 参考答案 MASTER 2019 年 月 3 日 1 1 INPUTOUTPUT 1 InputOutput 题目描述 用 cin 输入你的姓名 ( 没有空格 ) 和年龄 ( 整数 ), 并用 cout 输出 输入输出符合以下范例 输入 master 999 输出 I am master, 999 years old. 注意 "," 后面有一个空格,"." 结束,
More informationC++ 程式設計
C C 料, 數, - 列 串 理 列 main 數串列 什 pointer) 數, 數, 數 數 省 不 不, 數 (1) 數, 不 數 * 料 * 數 int *int_ptr; char *ch_ptr; float *float_ptr; double *double_ptr; 數 (2) int i=3; int *ptr; ptr=&i; 1000 1012 ptr 數, 數 1004
More information詞 彙 表 編 號 詞 彙 描 述 1 預 約 人 資 料 中 文 姓 名 英 文 姓 名 身 份 證 字 號 預 約 人 電 話 性 別 2 付 款 資 料 信 用 卡 別 信 用 卡 號 信 用 卡 有 效 日 期 3 住 房 條 件 入 住 日 期 退 房 日 期 人 數 房 間 數 量 入
100 年 特 種 考 試 地 方 政 府 公 務 人 員 考 試 試 題 等 別 : 三 等 考 試 類 科 : 資 訊 處 理 科 目 : 系 統 分 析 與 設 計 一 請 參 考 下 列 旅 館 管 理 系 統 的 使 用 案 例 圖 (Use Case Diagram) 撰 寫 預 約 房 間 的 使 用 案 例 規 格 書 (Use Case Specification), 繪 出 入
More informationCC213
: (Ken-Yi Lee), E-mail: feis.tw@gmail.com 49 [P.51] C/C++ [P.52] [P.53] [P.55] (int) [P.57] (float/double) [P.58] printf scanf [P.59] [P.61] ( / ) [P.62] (char) [P.65] : +-*/% [P.67] : = [P.68] : ,
More informationC/C++语言 - 运算符、表达式和语句
C/C++ Table of contents 1. 2. 3. 4. C C++ 5. 6. 7. 1 i // shoe1.c: # include # define ADJUST 7. 64 # define SCALE 0. 325 int main ( void ) { double shoe, foot ; shoe = 9. 0; foot = SCALE * shoe
More informationuntitled
A, 3+A printf( ABCDEF ) 3+ printf( ABCDEF ) 2.1 C++ main main main) * ( ) ( ) [ ].* ->* ()[] [][] ** *& char (f)(int); ( ) (f) (f) f (int) f int char f char f(int) (f) char (*f)(int); (*f) (int) (
More informationC/C++语言 - C/C++数据
C/C++ C/C++ Table of contents 1. 2. 3. 4. char 5. 1 C = 5 (F 32). 9 F C 2 1 // fal2cel. c: Convert Fah temperature to Cel temperature 2 # include < stdio.h> 3 int main ( void ) 4 { 5 float fah, cel ;
More informationC 1
C homepage: xpzhangme 2018 5 30 C 1 C min(x, y) double C // min c # include # include double min ( double x, double y); int main ( int argc, char * argv []) { double x, y; if( argc!=
More informationebook39-5
5 3 last-in-first-out, LIFO 3-1 L i n e a r L i s t 3-8 C h a i n 3 3. 8. 3 C + + 5.1 [ ] s t a c k t o p b o t t o m 5-1a 5-1a E D 5-1b 5-1b E E 5-1a 5-1b 5-1c E t o p D t o p D C C B B B t o p A b o
More informationMicrosoft Word - 第3章.doc
Java C++ Pascal C# C# if if if for while do while foreach while do while C# 3.1.1 ; 3-1 ischeck Test() While ischeck while static bool ischeck = true; public static void Test() while (ischeck) ; ischeck
More informationchp6.ppt
Java 软 件 设 计 基 础 6. 异 常 处 理 编 程 时 会 遇 到 如 下 三 种 错 误 : 语 法 错 误 (syntax error) 没 有 遵 循 语 言 的 规 则, 出 现 语 法 格 式 上 的 错 误, 可 被 编 译 器 发 现 并 易 于 纠 正 ; 逻 辑 错 误 (logic error) 即 我 们 常 说 的 bug, 意 指 编 写 的 代 码 在 执 行
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 information全国计算机技术与软件专业技术资格(水平)考试
全 国 计 算 机 技 术 与 软 件 专 业 技 术 资 格 ( 水 平 ) 考 试 2008 年 上 半 年 程 序 员 下 午 试 卷 ( 考 试 时 间 14:00~16:30 共 150 分 钟 ) 试 题 一 ( 共 15 分 ) 阅 读 以 下 说 明 和 流 程 图, 填 补 流 程 图 中 的 空 缺 (1)~(9), 将 解 答 填 入 答 题 纸 的 对 应 栏 内 [ 说 明
More informationMicrosoft Word - 01.DOC
第 1 章 JavaScript 简 介 JavaScript 是 NetScape 公 司 为 Navigator 浏 览 器 开 发 的, 是 写 在 HTML 文 件 中 的 一 种 脚 本 语 言, 能 实 现 网 页 内 容 的 交 互 显 示 当 用 户 在 客 户 端 显 示 该 网 页 时, 浏 览 器 就 会 执 行 JavaScript 程 序, 用 户 通 过 交 互 式 的
More informationuntitled
1 行 行 行 行.NET 行 行 類 來 行 行 Thread 類 行 System.Threading 來 類 Thread 類 (1) public Thread(ThreadStart start ); Name 行 IsAlive 行 行狀 Start 行 行 Suspend 行 Resume 行 行 Thread 類 (2) Sleep 行 CurrentThread 行 ThreadStart
More information《大话设计模式》第一章
第 1 章 代 码 无 错 就 是 优? 简 单 工 厂 模 式 1.1 面 试 受 挫 小 菜 今 年 计 算 机 专 业 大 四 了, 学 了 不 少 软 件 开 发 方 面 的 东 西, 也 学 着 编 了 些 小 程 序, 踌 躇 满 志, 一 心 要 找 一 个 好 单 位 当 投 递 了 无 数 份 简 历 后, 终 于 收 到 了 一 个 单 位 的 面 试 通 知, 小 菜 欣 喜
More informationuntitled
1 Outline 類别 欄 (1) 類 類 狀 更 易 類 理 若 類 利 來 利 using 來 namespace 類 ; (2) namespace IBM class Notebook namespace Compaq class Notebook 類别 類 來 類 列 欄 (field) (property) (method) (event) 類 例 立 來 車 類 類 立 車 欄 料
More information新・解きながら学ぶC言語
330!... 67!=... 42 "... 215 " "... 6, 77, 222 #define... 114, 194 #include... 145 %... 21 %... 21 %%... 21 %f... 26 %ld... 162 %lf... 26 %lu... 162 %o... 180 %p... 248 %s... 223, 224 %u... 162 %x... 180
More informationuntitled
Introduction to Programming ( 數 ) Lecture 3 Spring 2005 March 4, 2005 Lecture 2 Outline 數 料 If if 狀 if 2 (Standard Output, stdout): 料. ((Standard Input, stdin): 料. 類 數 數 數 說 printf 見 數 puts 串 數 putchar
More information新版 明解C++入門編
511!... 43, 85!=... 42 "... 118 " "... 337 " "... 8, 290 #... 71 #... 413 #define... 128, 236, 413 #endif... 412 #ifndef... 412 #if... 412 #include... 6, 337 #undef... 413 %... 23, 27 %=... 97 &... 243,
More information第3章.doc
3 3 3 3.1 3 IT Trend C++ Java SAP Advantech ERPCRM C++ C++ Synopsys C++ NEC C C++PHP C++Java C++Java VIA C++ 3COM C++ SPSS C++ Sybase C++LinuxUNIX Motorola C++ IBM C++Java Oracle Java HP C++ C++ Yahoo
More information提问袁小兵:
C++ 面 试 试 题 汇 总 柯 贤 富 管 理 软 件 需 求 分 析 篇 1. STL 类 模 板 标 准 库 中 容 器 和 算 法 这 部 分 一 般 称 为 标 准 模 板 库 2. 为 什 么 定 义 虚 的 析 构 函 数? 避 免 内 存 问 题, 当 你 可 能 通 过 基 类 指 针 删 除 派 生 类 对 象 时 必 须 保 证 基 类 析 构 函 数 为 虚 函 数 3.
More information学习MSP430单片机推荐参考书
MSP430 16 MSP430 C MSP430 C MSP430 FLASH 16 1 CPU 16 ALU 16 PC SP SR R4~R15 2 3 00-FFH 100-1FFH 4 5 1 2 51 24 27 6 1 2 3 4 5 6 4 12 SR SP SR CPU SR CPU C Z N GIE CPUOff CPU OscOff SCG0 SCG1 CPU EXIT SP
More information( 总 第 1073 期 ) 浙 江 省 人 民 政 府 主 办 2015 年 3 月 17 日 出 版 省 政 府 令 省 政 府 文 件 目 录 浙 江 省 大 型 群 众 性 活 动 安 全 管 理 办 法 ( 浙 江 省 人 民 政 府 令 第 333 号 ) (3) 浙 江 省 人 民 政
( 总 第 1073 期 ) 浙 江 省 人 民 政 府 主 办 2015 年 3 月 17 日 出 版 省 政 府 令 省 政 府 文 件 目 录 浙 江 省 大 型 群 众 性 活 动 安 全 管 理 办 法 ( 浙 江 省 人 民 政 府 令 第 333 号 ) (3) 浙 江 省 人 民 政 府 关 于 命 名 第 一 批 省 级 生 态 市 第 七 批 省 级 生 态 县 ( 市 区 )
More informationnooog
C : : : , C C,,, C, C,, C ( ), ( ) C,,, ;,, ; C,,, ;, ;, ;, ;,,,, ;,,, ; : 1 9, 2 3, 4, 5, 6 10 11, 7 8, 12 13,,,,, 2008 1 1 (1 ) 1.1 (1 ) 1.1.1 ( ) 1.1.2 ( ) 1.1.3 ( ) 1.1.4 ( ) 1.1.5 ( ) 1.2 ( ) 1.2.1
More information第一章.FIT)
第 一 章 美 丽 触 手 可 及 一 些 天 生 好 动 的 懒 人 袁 根 本 静 不 下 心 去 美 容 院 做 护 理 袁 通 常 总 是 用 一 些 最 野 懒 冶 的 方 法 来 保 养 自 己 遥 比 如 下 飞 机 以 后 感 觉 头 发 很 乱 袁 就 用 手 当 梳 子 随 手 梳 两 下 曰 脸 上 很 干 袁 就 往 脸 上 涂 些 酸 奶 尧 牛 奶 或 者 蜂 蜜 噎 噎
More information大 綱 最 有 利 標 目 的 及 類 型 最 有 利 標 之 辦 理 方 式 準 用 最 有 利 標 取 最 有 利 標 精 神 最 有 利 標 之 類 型 及 其 相 關 規 定 適 用 最 有 利 標 準 用 最 有 利 標 及 取 最 有 利 標 精 神 作 業 程 序 及 實 務 分 析
最 有 利 標 作 業 程 序 實 務 分 析 交 通 部 採 購 稽 核 小 組 陳 秘 書 牧 民 日 期 :101 年 05 月 21 日 大 綱 最 有 利 標 目 的 及 類 型 最 有 利 標 之 辦 理 方 式 準 用 最 有 利 標 取 最 有 利 標 精 神 最 有 利 標 之 類 型 及 其 相 關 規 定 適 用 最 有 利 標 準 用 最 有 利 標 及 取 最 有 利 標
More information6 C51 ANSI C Turbo C C51 Turbo C C51 C51 C51 C51 C51 C51 C51 C51 C C C51 C51 ANSI C MCS-51 C51 ANSI C C C51 bit Byte bit sbit
6 C51 ANSI C Turbo C C51 Turbo C C51 C51 C51 C51 C51 C51 C51 C51 C51 6.1 C51 6.1.1 C51 C51 ANSI C MCS-51 C51 ANSI C C51 6.1 6.1 C51 bit Byte bit sbit 1 0 1 unsigned char 8 1 0 255 Signed char 8 11 128
More informationC C
C C 2017 3 8 1. 2. 3. 4. char 5. 2/101 C 1. 3/101 C C = 5 (F 32). 9 F C 4/101 C 1 // fal2cel.c: Convert Fah temperature to Cel temperature 2 #include 3 int main(void) 4 { 5 float fah, cel; 6 printf("please
More information運算子多載 Operator Overloading
函數樣板 (Function Template) 與 類別樣板 (Class Template) 講師 : 洪安 1 資料結構與 C++ 程式設計進階班 為何需要通用函數? (1/2) int abs(int x) { return (x>0)?x:-x; 取名困難不好記 float fabs(float x) { return (x>0)?x:-x; complex cabs(complex x)
More informationmvc
Build an application Tutor : Michael Pan Application Source codes - - Frameworks Xib files - - Resources - ( ) info.plist - UIKit Framework UIApplication Event status bar, icon... delegation [UIApplication
More information<5B BECBB0EDB8AEC1F25D312D34B0AD5FC3E2BCAEBCF6BEF7C0DAB7E F31702E504446>
: 2 = 3 4? 0 an ordered set of unambiguous, executable steps that produces a result and terminates in a finite time (computational theory) ( ) 5 6 (C-) int min, max; float degree, b; char ch, token; /,,,
More informationC
C 2017 3 14 1. 2. 3. 4. 2/95 C 1. 3/95 C I 1 // talkback.c: 2 #include 3 #include 4 #define DENSITY 62.4 5 int main(void) 6 { 7 float weight, volume; 8 int size; 9 unsigned long letters;
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 information1 32 a + b a + b 2 2 a b a b 2 2 2 4a 12a + 9 a 6 2 4 a 12a + 9 a 6 ( 2a 3) 2 a 6 3 1 2 4 + 2 4 8 + 3 6 12 + 1 3 9 + 2 6 18+ 3 9 27 + 1 10 1 10 ax + by = 2 cx 7y = 8 1 2 1 4 1 8 1
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 information目 录 第 一 部 分 档 案 局 概 况 一 主 要 职 责 二 部 门 决 算 单 位 构 成 第 二 部 分 档 案 局 2016 年 度 部 门 预 算 表 一 2016 年 度 市 级 部 门 收 支 预 算 总 表 二 2016 年 度 市 级 部 门 支 出 预 算 表 三 2016
档 案 局 2016 年 度 部 门 预 算 1 目 录 第 一 部 分 档 案 局 概 况 一 主 要 职 责 二 部 门 决 算 单 位 构 成 第 二 部 分 档 案 局 2016 年 度 部 门 预 算 表 一 2016 年 度 市 级 部 门 收 支 预 算 总 表 二 2016 年 度 市 级 部 门 支 出 预 算 表 三 2016 年 度 市 级 部 门 财 政 拨 款 支 出 预
More information2015 年 度 收 入 支 出 决 算 总 表 单 位 名 称 : 北 京 市 朝 阳 区 卫 生 局 单 位 : 万 元 收 入 支 出 项 目 决 算 数 项 目 ( 按 功 能 分 类 ) 决 算 数 一 财 政 拨 款 168738.36 一 一 般 公 共 服 务 支 出 53.83 二
2015 年 度 部 门 决 算 报 表 ( 含 三 公 经 费 决 算 ) 2015 年 度 收 入 支 出 决 算 总 表 单 位 名 称 : 北 京 市 朝 阳 区 卫 生 局 单 位 : 万 元 收 入 支 出 项 目 决 算 数 项 目 ( 按 功 能 分 类 ) 决 算 数 一 财 政 拨 款 168738.36 一 一 般 公 共 服 务 支 出 53.83 二 上 级 补 助 收 入
More informationuntitled
串 串 例 : char ch= a ; char str[]= Hello ; 串 列 ch=getchar(); scanf( %c,&ch); 串 gets(str) scanf( %s,str); 8-1 數 ASCII 例 : char ch= A ; printf( %d,ch); // 65 A ascii =0x41 printf( %c,ch); // A 例 : char ch;
More information用户大会 论文集2.2.doc
MagGis MapGis GIS MagGis API DLL MapGis VC++ VB BC++ Delphi., Windows API MapGis VC++V Delphi Delphi Delphi MapGis Delphi Delphi Windows Delphi Delphi MapGis MapGis DLL API MapGis function _InitWorkArea(HINST:Integer):Integer;
More information(Microsoft Word - \277\357\262\325\252\272\246\322\266q.doc)
貳 選 組 的 考 量 選 組 議 題 對 最 近 高 一 同 學 來 說 是 迫 在 眉 睫, 其 實 有 些 同 學 是 老 神 在 在, 早 就 知 道 要 選 自 然 組 或 社 會 組 ; 但 是 對 少 數 同 學 說 是 困 擾 多 多, 因 為 真 的 難 以 取 捨, 不 知 如 何 是 好 此 問 題 須 考 慮 到 興 趣 能 力 大 學 校 系 工 作 價 值 觀 行 業 趨
More information山东建筑大学学分制管理规定(试行)
山 建 大 校 字 2015 67 号 山 东 建 筑 大 学 关 于 印 发 学 分 制 管 理 规 定 ( 试 行 ) 的 通 知 各 院 部 校 直 各 部 门 : 山 东 建 筑 大 学 学 分 制 管 理 规 定 ( 试 行 ) 已 经 学 校 研 究 同 意, 现 印 发 给 你 们, 请 认 真 遵 照 执 行 山 东 建 筑 大 学 2015 年 8 月 7 日 1 山 东 建 筑
More informationC/C++ - 结构体、共用体、枚举体
C/C++ Table of contents 1. 2. 3. 4. 5. 6. 7. 8. 1 C C (struct) C 2 C C (struct) C 2 i // book.c: # include < stdio.h> # define MAX_ TITLE 41 # define MAX_ AUTHOR 31 struct book { char title [ MAX_ TITLE
More information5-1淡江大學學則950602
淡 江 大 學 學 則 教 育 部 台 (86) 高 ( 二 ) 字 第 86028132 號 函 核 准 87.10.28 教 務 會 議 通 過 87.11.06 校 務 會 議 通 過 教 育 部 台 (87) 高 ( 二 ) 字 第 87145848 號 函 備 查 88.01.26 (88) 校 秘 字 第 0243 號 函 修 正 89.06.09 第 43 次 校 務 會 議 修 正
More information汇集全球21位医生的经验和智慧,总结出最实用的专业建议,这些都是最值得你牢记的健康提醒
彙 集 全 球 21 位 醫 生 的 經 驗 和 智 慧, 總 結 出 最 實 用 的 專 業 建 議, 這 些 都 是 最 值 得 你 牢 記 的 健 康 提 醒 top1. 不 是 每 個 人 都 適 合 做 近 視 矯 行 手 術, 除 非 你 在 手 術 前 已 經 持 續 穩 定 地 佩 戴 了 一 年 以 上 的 近 視 眼 鏡 或 者 隱 形 眼 鏡 如 果 你 時 摘 時 戴 眼 鏡,
More information1 行 业 发 展 不 平 衡 我 国 房 地 产 中 介 服 务 业 起 步 较 晚, 专 业 分 工 程 度 和 国 外 发 达 国 家 相 比 还 有 很 大 差 距 房 地 产 中 介 服 务 行 业 的 发 展 水 平 与 房 地 产 开 发 行 业 的 市 场 化 水 平 密 切 相 关
房 地 产 中 介 服 务 : 仍 处 于 成 长 期, 市 场 空 间 巨 大 作 者 : 庞 增 华 房 地 产 中 介 服 务 业 内 的 企 业 包 括 依 法 设 立 并 具 备 房 地 产 中 介 资 格 的 房 地 产 顾 问 策 划 房 地 产 代 理 销 售 房 地 产 评 估 房 地 产 经 纪 等 中 介 服 务 机 构, 是 房 地 产 开 发 价 值 链 中 不 可 或 缺
More information新婚夫妇必读(九).doc
...1...3...4...5...9...9...10...12...14 3...19...20...22...27...28...30...31...35...37 I 13...39...44...48...49...50...51...54...55...58...60...62...63...66...67...68...70...71 TOP10...73...77...79...80
More information《佛子行三十七颂》讲记1
佛 子 行 三 十 七 颂 讲 记 1 达 真 堪 布 光 明 大 圆 满 法 坛 城 为 修 持 成 佛 要 发 殊 胜 菩 提 心! 为 度 化 一 切 父 母 众 生 要 发 誓 修 持 成 佛! 为 早 日 圆 成 佛 道 要 精 进 认 真 闻 思 修 行! 今 天 在 这 里 给 大 家 简 单 地 开 示 一 下 佛 子 行 三 十 七 颂 佛 子 行 三 十 七 颂 是 土 美 仁
More information(给多有拉姆)佛子行三十七颂1——7
胜 利 道 歌 天 鼓 妙 音 法 王 如 意 宝 晋 美 彭 措 造 颂 怙 主 诸 佛 智 慧 身, 文 殊 师 利 童 子 尊, 恒 住 八 瓣 莲 蕊 心, 所 言 愿 利 诸 有 情 甚 深 光 明 大 圆 满, 仅 闻 词 句 断 有 根, 六 月 修 要 得 解 脱, 唯 此 铭 刻 于 心 中 遇 此 胜 法 善 缘 众, 前 世 累 劫 积 资 果, 与 普 贤 王 同 缘 分,
More information至 尊 法 王 蒋 阳 龙 朵 加 参 尊 者 上 师 瑜 伽 皈 依 境
至 尊 法 王 蒋 阳 龙 朵 加 参 尊 者 上 师 瑜 伽 皈 依 境 大 恩 上 师 慈 成 加 参 仁 波 切 目 录 修 法 仪 轨 3 16 24 课 前 念 诵 正 修 上 师 瑜 伽 念 诵 课 后 回 向 为 何 修 持 35 36 38 39 42 上 师 的 含 义 上 师 对 寻 求 解 脱 者 的 重 要 性 谨 慎 选 择 上 师 具 德 上 师 应 具 备 的 条 件
More informationC/C++ - 字符串与字符串函数
C/C++ Table of contents 1. 2. 3. 4. 1 char C 2 char greeting [50] = " How " " are " " you?"; char greeting [50] = " How are you?"; 3 printf ("\" Ready, go!\" exclaimed John."); " Ready, go!" exclaimed
More information02
Thinking in C++: Volume One: Introduction to Standard C++, Second Edition & Volume Two: Practical Programming C++ C C++ C++ 3 3 C C class C++ C++ C++ C++ string vector 2.1 interpreter compiler 2.1.1 BASIC
More information软件工程文档编制
实训抽象类 一 实训目标 掌握抽象类的定义 使用 掌握运行时多态 二 知识点 抽象类的语法格式如下 : public abstract class ClassName abstract void 方法名称 ( 参数 ); // 非抽象方法的实现代码 在使用抽象类时需要注意如下几点 : 1 抽象类不能被实例化, 实例化的工作应该交由它的子类来完成 2 抽象方法必须由子类来进行重写 3 只要包含一个抽象方法的抽象类,
More informationC++ 程序设计 OJ2 - 参考答案 MASTER 2019 年 5 月 3 日 1
C++ 程序设计 OJ2 - 参考答案 MASTER 2019 年 5 月 3 日 1 1 PERSON 1 Person 题目描述 编写程序, 定义一个基类 Person, 包含 name 和 age 两个数据成员 ; 再由它派生出学生类 Student 和教师类 Teacher, 其中学生类添加学号 no 数据, 教师类添加职称 title 数据 ; 要求每个类均有构造函数 析构函数和显示数据的函数
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 informationMicrosoft Word - 把时间当作朋友(2011第3版)3.0.b.06.doc
2 5 8 11 0 13 1. 13 2. 15 3. 18 1 23 1. 23 2. 26 3. 28 2 36 1. 36 2. 39 3. 42 4. 44 5. 49 6. 51 3 57 1. 57 2. 60 3. 64 4. 66 5. 70 6. 75 7. 83 8. 85 9. 88 10. 98 11. 103 12. 108 13. 112 4 115 1. 115 2.
More informationIO
1 C/C++ C FILE* fscanf fgets fread fprintf fputs fwrite C++ ifstream ofstream >>
More informationRUN_PC連載_10_.doc
PowerBuilder 8 (10) Jaguar CTS ASP Jaguar CTS PowerDynamo Jaguar CTS Microsoft ASP (Active Server Pages) ASP Jaguar CTS ASP Jaguar CTS ASP Jaguar CTS ASP Jaguar CTS ASP Jaguar CTS ASP Jaguar Server ASP
More informationuntitled
1-1 1-2 1-3 1-4 1-5 1-6 1-7 1-8 1-1-1 C int main(void){ int x,y,z; int sum=0; double avg=0.0; scanf("%d",&x) ; scanf("%d",&y) ; scanf("%d",&z) ; sum=x+y+z ; avg=sum/3.0; printf("%f\n",avg); system("pause");
More informationMicrosoft Word - 第7章 类与对象.docx
第 7 章类与对象 案例 1 地址类 #include class Address char Name[21]; char Street[51]; char City[51]; char Postcode[10]; SetAddress(char *name,char *street,char *city,char *postcode); void ChangeName(char
More informationCHAPTER VC#
1. 2. 3. 4. CHAPTER 2-1 2-2 2-3 2-4 VC# 2-5 2-6 2-7 2-8 Visual C# 2008 2-1 Visual C# 0~100 (-32768~+32767) 2 4 VC# (Overflow) 2-1 2-2 2-1 2-1.1 2-1 1 10 10!(1 10) 2-3 Visual C# 2008 10! 32767 short( )
More informationKillTest 质量更高 服务更好 学习资料 半年免费更新服务
KillTest 质量更高 服务更好 学习资料 http://www.killtest.cn 半年免费更新服务 Exam : 310-065Big5 Title : Sun Certified Programmer for the Java 2 Platform, SE 6.0 Version : Demo 1 / 14 1. 35. String #name = "Jane Doe"; 36. int
More information