当前位置:文档之家› C++面向对象程序设计教程(第3版)—-陈维兴,林小茶课后习题答案

C++面向对象程序设计教程(第3版)—-陈维兴,林小茶课后习题答案

C++面向对象程序设计教程(第3版)—-陈维兴,林小茶课后习题答案
C++面向对象程序设计教程(第3版)—-陈维兴,林小茶课后习题答案

C++面向对象程序设计教程课后题答案

1.1 什么是面向对象程序设计?

面向对象程序设计是一种新的程序设计范型.这种范型的主要特征是:

程序=对象+消息

面向对象程序的基本元素是对象。

主要结构特点是:

第一,程序一般由类的定义和类的使用两部分组成;

第二,程序中的一切操作都是通过向对象发送消息来实现的。

1.2 什么是对象?什么是类?对象与类之间的关系是什么?

对象是描述其属性的数据以及对这些数据施加的一组操作封装在一起构成的统一体。

类就是具有相同的数据和相同的操作的一组对象的集合,也就是说,类是对具有相同数据结构和相同操作的一类对象的描述。

类和对象之间的关系是抽象和具体的关系。类是多个对象进行综合抽象的结果,一个对象是类的一个实例。

1.3 现实世界中的对象有哪些特征?请举例说明。

现实世界中的对象具有以下特征:

1) 每一个对象必须有一个名字以区别于其他对象;

2) 用属性来描述对象的某些特征;

3) 有一组操作,每组操作决定对象的一种行为;

4) 对象的行为可以分为两类:一类是作用于自身的行为,另一类是作用于其他对象的行为。

例如一个教师是一个对象。每个教师对象有自己的名字来和别的教师区别。教师具有编号,姓名,年龄,职称,专业等属性。教师拥有走路,吃饭,授课等行为操作。走路,吃饭是作用于自身的行为,授课是作用于其他对象的行为。

1.4 什么是消息?消息具有什么性质?

一个对象向另一个对象发出的请求成为“消息”。

消息具有以下3个性质:

1) 同一个对象可以接收不同形式的多个消息,做出不同的相应;

2) 相同形式的消息可以传递给不同的对象,所做出的响应可以是不同的;

3) 对消息的响应并不是必须的,对象可以响应消息,也可以不响应。

1.5 什么是抽象和封装?请举例说明。

抽象是将有关事物的共性归纳、集中的过程。

例如:把所有具有大学生学籍的人归为一类,成为“大学生”,这就是一个抽象。

封装是指把数据和实现操作的代码集中起来放在对象内部,并尽可能隐藏对象的内部细节。

例如:每一台洗衣机都有出厂日期、机器编号等属性,也有启动、暂停、选择等操作。人们在使用洗衣机的时候只需要按下对应的按钮,而不用关心具体的内部实现。这就是封装。

1.6 什么是继承?请举例说明。

继承就是允许派生类使用基类的数据和操作,同时,派生类还可以增加新的操作和数据。

例如:哺乳动物是一种热血、有毛发、用奶哺育幼崽的动物;狗是有犬牙、食肉、特定的骨骼结构、群居的哺乳动物。狗就继承了哺乳动物。

1.7 若类之间具有继承关系,则他们之间具有什么特征?

若类之间具有继承关系,则他们之间具有下列几个特征:

1) 类间具有共享特征(包括数据和操作代码的共享);

2) 类间具有差别或新增部分(包括非共享的数据和操作代码);

3) 类具有层次结构。

1.8 什么是单继承、多继承?请举例说明。

单继承是指每个派生类只直接继承了一个基类的特征。例如狗继承自哺乳动物。

多继承是指多个基类派生出一个派生类的继承关系。比如玩具车同时继承自玩具和车。

1.9 什么是多态?请举例说明。

多态是指不同的对象收到相同的消息时执行不同的操作。

例如,有一个窗口类对象,还有一个棋子类对象。当我们发出“移动”消息时,两个对象的行为不同。

1.10 面向对象程序设计的主要优点是什么?

1.可提高程序的重用性;

2.可控制程序的复杂性;

3.可改善程序的可维护性;

4.能够更好地支持大型程序设计;

5.增强了计算机处理信息的范围;

能够很好地适应新的硬件环境。

2.1 简述C++的主要特点。

1) C++是C的超集,保持与C的兼容。

2) 保持了C的简洁、高效和接近汇编语言等特点,并对C的功能作了不少扩充。用C++编写的程序比C更安全,可读性更好,代码结构更为合理。

3) 程序质量高。

4) 增加了面向对象机制。

2.2

#include

using namespace std;

int main()

{

int a, b, d, min;

cout << "Enter two numbers:";

cin >> a >> b;

min = a > b ? b : a;

for(d = 2; d < min; d++)

{

if(((a % d) == 0) && ((b % d ) == 0)) break;

}

if (d == min)

{

cout << "No common denominators" << endl;

return0;

}

cout << "The lowest common denominator is" << d << endl;

return0;

}

2.3 有效

2.4 没有函数声明;

函数定义没有写返回值类型。

2.5 (1)等价,函数声明可以省略参数的名字。

(2)不等价,第二个的函数定义不能省略参数的名字。

2.6-2.10 CDAAB

2.11-2.15 ACBDC

2.16-2.17 DC

2.18

101

2.19

10 10

2.20

10

20

2.21 举例说明可以使用const替代#define以消除#define的不安全性。

#include

using namespace std;

int main()

{

int a = 1;

#define T1 a+a

#define T2 T1-T1

cout << "T2 is " << T2 <

return0;

}

上面这个程序,初看应该输出 T2 is 0

但是实际上,得出T2 is 2

如果把#define换成const,则可以输出想要的结果。

2.22 用动态分配空间的方法,计算Fibonacci数列的前20项,并存储到动态分配的空间中。

#include

using namespace std;

int main()

{

int *pi = new int[20];

*pi = 1;

pi[1] = 1;

for(int i = 2; i < 20; i++)

{

pi[i] = pi[i - 2] + pi[i - 1];

}

return0;

}

2.23 重载sroot函数,输出一个数的二次方根。

#include

using namespace std;

double sroot(int num)

{

return (double)sqrt((double)num);

}

double sroot(long num)

{

return (double)sqrt((double)num);

}

double sroot (double num)

{

return (double)sqrt(num);

}

int main()

{

return0;

}

2.24 解决百钱问题。将一元人民币换成1、2、5分的硬币,有多少种换法?

#include

using namespace std;

int main()

{

int num = 0; //总共换法的总数。初始化为0。

for(int i = 0; i <= 100; i++)

{

for(int j = 0; j <= 50; j++)

{

if((i + 2*j) > 100)

{

break;

}

for(int k = 0; k <= 20; k++)

{

if((i + 2*j + 5*k) == 100)

{

num++;

cout << "1分" << i << "个;" << "2分" << j << "个;" << "5分" << k << "个;" << endl;

}

if ((i + 2*j + 5*k) > 100)

{

break;

}

}

}

}

cout << num << endl;

return0;

}

2.25 输入两个整数,按由小到大的顺序输出。要求使用变量的引用。

#include

using namespace std;

void swap(int &a, int &b)

{

a = a + b;

b = a - b;

a = a - b;

}

int main()

{

int a, b;

cin >> a >>b;

if(a > b)

{

swap(a, b);

}

cout << a << "," << b << endl;

return0;

}

2.26 用二分法求解f(x)=0的根。

#include

using namespace std;

double Fun(double x)

{

return35*x +25; //假设f(x)=35x+25

}

int main()

{

double a, b;

cin >> a;

if(Fun(a) == 0)

{

cout << "x = " << a << endl;

return0;

}

do

{

cin >> b;

}

while ((Fun(a) * Fun(b)) >= 0);

if(Fun(b) == 0)

{

cout << "x = " << b << endl;

return0;

}

if(a > b)

{

a = a + b;

b = a - b;

a = a - b;

}

while(1)

{

if(Fun((a + b)/2) == 0)

{

cout << "x = " << (a + b)/2 << endl;

return0;

}

if(Fun(a) * Fun((a + b)/2) < 0)

{

b = (a + b)/2;

}

if(Fun(b) * Fun((a + b)/2) < 0)

{

a = (a + b)/2;

}

}

return0;

}

3.1 类声明的一般格式是什么?

class类名

{

[private:]

私有数据成员和成员函数

public:

公有数据成员和成员函数

}

3.2 构造函数和析构函数的主要作用是什么?它们各自有什么特性?

构造函数是一种特殊的成员函数,它主要用于为对象分配空间,进行初始化。

构造函数的名字必须与类名相同,而不能由用户任意命名。它可以有任意类型的参数,但不能具有返回值类型。

析构函数通常用于执行一些清理任务,如释放分配给对象的内存空间等。

析构函数名与类名相同,但它前面必须加一个波浪号。不能有返回值,也不能有参数。

3.3 什么是对象数组?

所谓对象数组,是指每一个数组元素都是对象的数组。

3.4 什么是this指针?它的主要作用是什么?

C++为成员函数提供了一个名为this的指针,这个指针称为自引用指针。每当创建一个对象时,系统就把this指针初始化为指向该对象。

一个类的所有对象合用一份成员函数,this指针可以帮助对象辨别出当前调用的是自己的那个对象的数据成员和函数。

3.5 友元函数有什么作用?

友元函数可以在类的外部访问类的私有成员或保护成员。

3.6

(1)声明并定义了P2, P3,并用默认无参构造函数初始化。

(2)声明并定义了P2,并调用Point类的拷贝构造函数用P1对P2进行初始化。

(3)声明并定义了P2,并调用Point类的拷贝构造函数用P1对P2进行初始化。

(4)调用拷贝构造函数,将P1的成员值赋值给P4的成员。

3.7-3.10 BCCB

3.11-3.15 BAABA

3.16-3.17 BB

3.18

10,20

30,48

50,68

70,80

90,16

11,120

3.19

Constructing

10

100

Destructing

3.20

3objects in existence

4objects in existence after allocation 3objects in existence after deletion

3.21

Counting at0

Counting at9

3.22

Default constructor called.

Default constructor called. Default constructor called. Construcotor:a=1,b=2

Construcotor:a=3,b=4

Construcotor:a=5,b=6

3.23

Con.

Copy con.

default.

Copy con.

3.24

A=5

B=14

A=9

B=14

3.25

5,7

22.25

3.26

Constructing

Constructing

A=5

B=15

A=10

B=15

Destructing

Destructing

3.27

void pintStu();函数只有声明,没有定义。

age是私有成员,不能用对象直接调用。

3.28

void printStu() 和 void setSno(int s) 没有加限定符 Student:: void setAge(int a)在类中没有声明

3.29

构造函数不能定义为私有。否则无法创建对象。

3.30 下面是一个计算器类的定义,请完成该类成员函数的实现。

class counter

{

public:

counter(int number);

void increment(); //给原始值加1

void decrement(); //给原始值减1 int getvalue(); //取的计数器值int print(); //显示计数private:

int value;

};

counter::counter(int number)

{

value = number;

}

void counter::increment()

{

++value;

}

void counter::decrement()

{

--value;

}

int counter::getvalue()

{

return value;

}

int counter::print()

{

cout << value <

return value;

}

3.31 根据注释语句提示,实现类Date的成员函数

#include

using namespace std;

class Date

{

public:

void printDate();

void setDay(int d);

void setMonth(int m);

void setYear(int y);

private:

int day, month, year;

};

void Date::printDate()

{

cout << "今天是" << year << "年" << month << "月" << day << "日" << endl;

}

void Date::setDay(int d)

{

day = d;

}

void Date::setMonth(int m)

{

month = m;

}

void Date::setYear(int y)

{

year = y;

}

int main()

{

Date testDay;

testDay.setDay(5);

testDay.setMonth(10);

testDay.setYear(2003);

testDay.printDate();

return0;

}

3.32 建立类cylinder, cylinder的构造函数被传递了两个double值,分别表示圆柱体的半径和高度。用类cylinder计算圆柱体的体积,并存储在一个double变量中。在类cylinder中包含一个成员函数vol,用来显示每个cylinder对象的体积。

const int PI = 3.14;

class cylinder

{

private:

double radius, height, volume;

public:

cylinder(int rad, int hei);

double getVolume();

void vol();

};

cylinder::cylinder(int rad, int hei)

{

radius = rad;

height = hei;

}

double cylinder::getVolume()

{

volume = PI * radius * radius *height;

return volume;

}

void cylinder::vol()

{

cout << "圆柱体的体积是: " << volume <

}

3.33 构建一个类book,其中包含有两个私有数据成员qu和price,将qu初始化为1~5,将price初始化为qu的10倍,建立一个有5个元素的数组对象。显示每个对象数组元素的qu*price值。

class book

{

private:

int qu, price;

public:

book(int qu);

int mult();

};

book::book(int q)

{

if(q < 1 || q > 5)

{

qu = 1;

}

else

{

qu = q;

}

price = 10 * qu;

}

int book::mult()

{

return qu * price;

}

int main()

{

book books[5] = {1,2,3,4,5};

for(int i = 0; i < 5; i++)

{

cout << books[i].mult() << "";

}

}

3.34 修改3.33,通过对象指针访问对象数组,使程序以相反的顺序显示每个对象数组元素的qu*price值。

class book

{

private:

int qu, price;

public:

book(int qu);

int mult();

};

book::book(int q)

{

if(q < 1 || q > 5)

{

qu = 1;

}

else

{

qu = q;

}

price = 10 * qu;

}

int book::mult()

{

return qu * price;

}

int main()

{

book books[5] = {1,2,3,4,5};

book *p = books;

p += 4;

for(int i = 0; i < 5; i++)

{

cout << p->mult() << "";

--p;

}

return0;

}

3.35 构建一个类Stock,含字符数组stockcode[]及整型数组成员quan、双精度型数据成员price。构造函数含3个参数:字符数组na[]及q、p。当定义Stock的类对象时,将对象的第一个字符串参数赋给数据成员stockcode,第2和第3个参数分别赋给quan、price。未设置第2和第3个参数时,quan的值为1000,price的值为8.98.成员函数print没有形参,需使用this指针,显示对象数据成员的内容。编写程序显示对象数据成员的值。

#include

using namespace std;

class Stock

{

private:

char stockcode[25];

int quan;

double price;

public:

Stock(char na[], int q = 1000, double p = 8.98);

Stock(char na[]);

void print();

};

Stock::Stock(char na[], int q = 1000, double p = 8.98)

{

strcpy(stockcode, na);

quan = q;

price = p;

}

void Stock::print()

{

cout << "stockcode: " << this->stockcode << " quan: " << this->quan << " price: " << this->price << endl;

}

int main()

{

Stock stock1("600001", 3000, 5.67);

Stock stock2("600002");

stock1.print();

stock2.print();

return0;

}

3.36 编写一个程序,已有若干学生的数据,包括学号、姓名、成绩,要求输出这些学生的数据并计算出学生人数和平均成绩(要求将学生人数和总成绩用静态数据成员表示)。

#include

using namespace std;

class student

{

private:

char name[25], studentNo[10];

int score;

static int sum;

static int totalScore;

public:

student(char na[], char stuNo[], int sc);

void show();

数据库系统基础教程(第二版)课后习题答案

Database Systems: The Complete Book Solutions for Chapter 2 Solutions for Section 2.1 Exercise 2.1.1 The E/R Diagram. Exercise 2.1.8(a) The E/R Diagram Kobvxybz Solutions for Section 2.2 Exercise 2.2.1 The Addresses entity set is nothing but a single address, so we would prefer to make address an attribute of Customers. Were the bank to record several addresses for a customer, then it might make sense to have an Addresses entity set and make Lives-at a many-many relationship. The Acct-Sets entity set is useless. Each customer has a unique account set containing his or her accounts. However, relating customers directly to their accounts in a many-many relationship conveys the same information and eliminates the account-set concept altogether. Solutions for Section 2.3 Exercise 2.3.1(a) Keys ssNo and number are appropriate for Customers and Accounts, respectively. Also, we think it does not make sense for an account to be related to zero customers, so we should round the edge connecting Owns to Customers. It does not seem inappropriate to have a customer with 0 accounts;

光学教程答案(第五章)

1. 试确定下面两列光波 E 1=A 0[e x cos (wt-kz )+e y cos (wt-kz-π/2)] E 2=A 0[e x sin (wt-kz )+e y sin (wt-kz-π/2)] 的偏振态。 解 :E 1 =A 0[e x cos(wt-kz)+e y cos(wt-kz-π/2)] =A 0[e x cos(wt-kz)+e y sin(wt-kz)] 为左旋圆偏振光 E 2 =A 0[e x sin(wt-kz)+e y sin(wt-kz-π/2)] =A 0[e x sin(wt-kz)+e y cos(wt-kz)] 为右旋圆偏振光 2. 为了比较两个被自然光照射的表面的亮度,对其中一个表面直接进行观察,另一个表面 通过两块偏振片来观察。两偏振片透振方向的夹角为60° 。若观察到两表面的亮度相同,则两表面的亮度比是多少已知光通过每一块偏振片后损失入射光能量的10%。 解∶∵亮度比 = 光强比 设直接观察的光的光强为I 0, 入射到偏振片上的光强为I ,则通过偏振片系统的光强为I': I'=(1/2)I (1-10%)cos 2 600 ?(1-10%) 因此: ∴ I 0/ I = ×(1-10%)cos 2 600 ?(1-10%) = %. 3. 两个尼科耳N 1和N 2的夹角为60° ,在他们之间放置另一个尼科耳N 3,让平行的自然光通过这个系统。假设各尼科耳对非常光均无吸收,试问N 3和N 1 的偏振方向的夹角为何值时,通过系统的光强最大设入射光强为I 0,求此时所能通过的最大光强。 解: 20 1 I I = Θ

综合教程1课后答案

综合教程1课后答案 Unit 1 College Life Enhance Your Language Awareness Words in Action 1. (P.23) 1) deliver 2) polish 3) available 4) latter 5)file 6) thrive 7) undertook 8) practical 9) fulfill 10) perceived 11) accumulated 12) multiplied 2. (P.24) 1)compromise 2) self-induced 3) steered 4) frame 5)demonstrated 6) employ 7) promote 8) impressed 9)contribution 10) deliberately 11) financial 12) economic 3.(P.24) 1)makes a point of 2) refresh my memory 3) lead to 4) at hand 5) working out 6) under pressure 7) Last but not least 8) down 9) In addition to 10) were involved 11) in other words 12) pointed out 13) pay off 4. (P.25) 1) scored 2) scheduled 3) assigned 4) motivated 5) crucial 6) promote 7) perform 8) debate 9) scanned 10) devised 11) advocated 12) clarify 13) priorities 14) compromised 15) context 16) undertook Final sentence: academic excellence Increasing Your Word Power 1.( P.26~27) 1)principal/ major 2) top 3) major 4) top 5)principal 6) major 7) schedule 8)advocate/have advocated 9) top 10) approach 11)blame 12) major/ principal 13) advocate 14) schedule 15)blame 16) approaching 17) pressure 18) pace 19)pressured 20) pace Cloze (P.31) 1)academic 2) priorities 3) conducted 4) principles 5)begin 6) priority 7) compromised 8) addition 9)filling 10) Speaking 11) formula 12)Participation/ Participating 13) based 14) least 15)way 16) pressure

(完整版)全新版大学英语第二版综合教程4课后答案全

Unit 1 lexf Organization

II. More Synonyms in Context 1) During the First World War, battles occurred here and there over vast areas. Some of the most dramatic fighting took place in the gloomy trenches of France and Belgium. 2) Elizabeth made careful preparations for the interview and her efforts / homework paid off. 3)1 spent hours trying to talk him into accepting the settlement, but he turned a deaf ear to all my words. 4) Pneumonia had severely weakened her body, and I wondered how her fragile body could withstand the harsh weather.

- 90 - Appendix I III. Usage 1)But often it is not until we fall ill that we finally learn to appreciate good health. 2)A rich old lady lay dead at home for two weeks—and nobody knew anything about it. 3)It's said he dropped dead from a heart attack when he was at work 1)Don't sit too close to the fire to keep warm—you could easily get burned, especially if you fall asleep. 4)In those days people believed in marrying young and having children early. 5)Little Tom was unable to sit still for longer than a few minutes. ■ Structure 1. 1) To his great delight, Dr. Deng discovered two genes in wild rice that can increase the yield by 30 percent. 2)To her great relief, her daughter had left the building before it collapsed. 3)To our disappointment, our women's team lost out to the North Koreans. 4)We think, much to our regret, that we will not be able to visit you during the coming Christmas. 2. 1) These birds nest in the vast swamps (which lie to the) east of the Nile. 2)By 1948, the People's Liberation Army had gained control of the vast areas north of the Yangtze River. 3)Michelle was born in a small village in the north of France, but came to live in the United States at the age of four. ■ 4) The Columbia River rises in western Canada and continues/runs through the United States for about 1,900 kilometers west of the Rocky Mountains. Comprehensive Exercises I. Cloze (A) 1. invasion 3. Conquest 5. launching 7. campaign 9. reckon with 2. s tand in the way 4. c atching... off his guard 6. d eclaration 8. d rag on 10. b ringing...to a

工程数学基础教程课后习题答案

工程数学基础习题解答

习题一 A

一、判断题 1.√;, 2.√; 3.×; 4.×; 5.×; 6.×; 7.×; 8.√; 9.√;10.×. 二、填空题 1.;C C A B 2.111(){1,2,3,4},(){,,},(){,,},(){1,4},(){2,3};f f a b e f A a b e f B f b --=====D R 3.满; 4.2sup = E ,3inf -=E ; 5.0; 6.0; 7. n ; 8.Y . B 1.证 ()y f A B ?∈?,x A B ?∈?使得)(x f y =.由x A B ∈?,得x A ∈,且x B ∈故()()y f x f A =∈且()y f B ∈,即()()y f A f B ∈?,因此()()()f A B f A f B ???. 当f 是单射时,只需证明()()()f A f B f A B ???即可: ()()(),y f A f B f ?∈??R f 由是单射知,(). (),(),1X y f x y f A y f B x ?=∈∈∈使得且 ,,()(),x A x B x A B y f x f A B ∴∈∈∈?=∈?且即从而故()()()f A f B f A B ???. 是可能的,例如, 2:,[2, 0],[1, 3],[1, 0].f x x A B A B =-=-?=-取则()([1,0])[0, 1], f A B f ?=-=于是而 [][]()()0, 4[0, 9]0, 4.f A f B ?=?=从而有 . 2. 证(1)n ?∈,有)2 ,2(12 ,12][-?-+-n n ,故 ∞ =-?-+-1)2 ,2(12 12][n n ,n . 另一方面,)2 ,2(-∈?x ,k ?∈ ,使][12 ,12k k x -+-∈,故 ∞ =-+-∈1 ][12 12n n ,n x ,于是 ? -)2 ,2( ∞ =-+-1 ][12 12n n ,n . 因此, ∞ =-+-= -1 ][12 ,12)2 ,2(n n n . (2)n ?∈,有)12 ,12(]2 ,2[n n +--?-,故 ∞ =+--?-1)12 ,12(]2 ,2[n n n . 另一方面,对任意]2 ,2[-?x ,即2>x ,k ?∈ ,使得212>+>k x ,即 )12 ,12(k k x +--?,从而 ∞ =+--?1)12 ,12(n n n x ,故 ∞ =-?+--1 ]2,2[)12 ,12(n n n .

《光学教程》姚启钧课后习题解答

《光学教程》(姚启钧)习题解答 第一章 光的干涉 1、波长为500nm 的绿光投射在间距d 为0.022cm 的双缝上,在距离180cm 处的光屏上形成干涉条纹,求两个亮条纹之间的距离。若改用波长为700nm 的红光投射到此双缝上,两个亮纹之间的距离为多少?算出这两种光第2级亮纹位置的距离。 解:1500nm λ= 改用2700nm λ= 两种光第二级亮纹位置的距离为: 2、在杨氏实验装置中,光源波长为640nm ,两狭缝间距为0.4mm ,光屏离狭缝的距离为50cm ,试求:⑴光屏上第1亮条纹和中央亮纹之间的距离;⑵若P 点离中央亮纹为0.1mm 问两束光在P 点的相位差是多少?⑶求P 点的光强度和中央点的强度之比。 解:⑴ 7050640100.080.04 r y cm d λ-?= =??= ⑵由光程差公式 ⑶中央点强度:2 04I A = P 点光强为:2 21cos 4I A π? ? =+ ?? ? 3、把折射率为1.5的玻璃片插入杨氏实验的一束光路中,光屏上原来第5级亮条纹所在的位置变为中央亮条纹,试求插入的玻璃片的厚度。已知光波长为7610m -? 解: 1.5n =,设玻璃片的厚度为d 由玻璃片引起的附加光程差为:()1n d δ'= -

4、波长为500nm 的单色平行光射在间距为0.2mm 的双缝上。通过其中一个缝的能量为另一个的2倍,在离狭缝50cm 的光屏上形成干涉图样,求干涉条纹间距和条纹的可见度。 解: 7050500100.1250.02 r y cm d λ-?= =??= 由干涉条纹可见度定义: 由题意,设2 2 122A A = ,即 1 2 A A = 5、波长为700nm 的光源与菲涅耳双镜的相交棱之间距离为20cm ,棱到光屏间的距离L 为180cm ,若所得干涉条纹中相邻亮条纹的间隔为1mm ,求双镜平面之间的夹角θ。 解:700,20,180,1nm r cm L cm y mm λ===?= 由菲涅耳双镜干涉条纹间距公式 6、在题1.6 图所示的劳埃德镜实验中,光源S 到观察屏的距离为1.5m ,到劳埃德镜面的垂直距离为2mm 。劳埃德镜长40cm ,置于光源和屏之间的中央。⑴若光波波长500nm λ=,问条纹间距是多少?⑵确定屏上可以看见条纹的区域大小,此区域内共有几条条纹?(提示:产生干涉的区域P 1P 2可由图中的几何关系求得) 解:由图示可知:7 050050010,40.4, 1.5150nm cm d mm cm r m cm λ-==?==== P 2 P 1 P 0 题1.6图

全新版大学英语_综合教程1_课后翻译与答案

《全新版大学英语综合教程1 课后翻译及答案》Unit 1 Growing Up 为自己而写 ——拉塞尔·贝克 从孩提时代,我还住在贝尔维尔时,我的脑子里就断断续续地转着当作家的念头,但直等到我高中三年级,这一想法才有了实现的可能。在这之前,我对所有跟英文课沾边的事都感到腻味。我觉得英文语法枯燥难懂。我痛恨那些长而乏味的段落写作,老师读着受累,我写着痛苦。弗利格尔先生接我们的高三英文课时,我就准备着在这门最最单调乏味的课上再熬上沉闷的一年。弗利格尔先生在学生中以其说话干巴和激励学生无术而出名。据说他拘谨刻板,完全落后于时代。我看他有六七十岁了,古板之极。他戴着古板的毫无装饰的眼镜,微微卷曲的头发剪得笔齐,梳得纹丝不乱。他身穿古板的套装,领带端端正正地顶着白衬衣的领扣。他长着古板的尖下巴,古板的直鼻梁,说起话来一本正经,字斟句酌,彬彬有礼,活脱脱一个滑稽的老古董。 我作好准备,打算在弗利格尔先生的班上一无所获地混上一年,不少日子过去了,还真不出所料。后半学期我们学写随笔小品文。弗利格尔先生发下一张家庭作业纸,出了不少题目供我们选择。像"暑假二三事"那样傻乎乎的题目倒是一个也没有,但绝大多数一样乏味。我把作文题带回家,一直没写,直到要交作业的前一天晚上。我躺在沙发上,最终不得不面对这一讨厌的功课,便从笔记本里抽出作文题目单粗粗一看。我的目光落在"吃意大利细面条的艺术"这个题目上。

这个题目在我脑海里唤起了一连串不同寻常的图像。贝尔维尔之夜的清晰的回忆如潮水一般涌来,当时,我们大家一起围坐在晚餐桌旁——艾伦舅舅、我母亲、查理舅舅、多丽丝、哈尔舅舅——帕特舅妈晚饭做的是意大利细面条。那时意大利细面条还是很少听说的异国食品。多丽丝和我都还从来没吃过,在座的大人也是经验不足,没有一个吃起来得心应手的。艾伦舅舅家诙谐有趣的场景全都重现在我的脑海中,我回想起来,当晚我们笑作一团,争论着该如何地把面条从盘子上送到嘴里才算合乎礼仪。 突然我就想描述那一切,描述当时那种温馨美好的气氛,但我把它写下来仅仅是想自得其乐,而不是为弗利格尔先生而写。那是我想重新捕捉并珍藏在心中的一个时刻。我想重温那个夜晚的愉快。然而,照我希望的那样去写,就会违反我在学校里学的正式作文的种种法则,弗利格尔先生也肯定会打它一个不及格。没关系。等我为自己写好了之后,我可以再为弗利格尔先生写点什么别的东西。 等我写完时已是半夜时分,再没时间为弗利格尔先生写一篇循规蹈矩、像模像样的文章了。第二天上午,我别无选择,只好把我为自己而写的贝尔维尔晚餐的故事交了上去。两天后弗利格尔先生发还批改过的作文,他把别人的都发了,就是没有我的。我正准备着遵命一放学就去弗利格尔先生那儿挨训,却看见他从桌上拿起我的作文,敲了敲桌子让大家注意听。 "好了,孩子们,"他说。"我要给你们念一篇小品文。文章的题目是: 吃意大利细面条的艺术。"

新标准大学英语综合教程4课后答案

Key to book4 un it1-4 Unit 1 Active readi ng (1) Look ing for a job after uni versity? First, get off the sofa Read ing and un dersta nding Dealing with unfamiliar words 3 Match the words in the box with their definitions. 1 to make progress by moving to the n ext stage in a series of acti ons or events (proceed) 2 the process of cha nging from one situati on, form or state to ano ther (tra nsiti on) 3 not feeli ng in volved with some one or someth ing in a close or emoti onal way (detached) 4 referri ng to somethi ng which will happe n soon (upco ming) 5 to be sitting still in a position that is not upright (slump) 6 to retur n to a previous state or way of behav ing (revert) 7 to say what happe ned (reco unt) 4 Complete the paragraph with the correct form of the words in Activity 3. It isn ' t easy to make the (tr)a nsiti on from a busy uni versity stude nt to an un employed young adult (2) slumped on a bar stool or half watch ing a min dless televisi on show, wondering if and how their career is going to (3) proceed . Many people who have experie need a long period of in activity like this, whe n (4) reco un ti ng how they felt at the

MATLAB基础教程薛山第二版课后习题答案讲解

《及应用》实验指导书 《及应用》实验指导书 班级: T1243-7 姓名:柏元强 学号: 20120430724 总评成绩: 汽车工程学院 电测与汽车数字应用中心

目录 实验04051001 语言基础..................... 错误!未指定书签。实验04051002 科学计算及绘图............. 1错误!未指定书签。实验04051003 综合实例编程.. (31)

实验04051001 语言基础 1实验目的 1) 熟悉的运行环境 2) 掌握的矩阵和数组的运算 3) 掌握符号表达式的创建 4) 熟悉符号方程的求解 2实验内容 第二章 1. 创建的变量,并进行计算。 (1) 87,190,计算 、、a*b 。 (87); (190); *b (2) 创建 8 类型的变量,数值与(1)中相同,进行相同的计算。 8(87); 8(190); *b 2.计算: (1) 操作成绩 报告成绩

(2) e3 (3) (60) (3) (3*4) 3.设,,计算: (1) (2) (3) 23; (4*u*v)(v) (((u))^2)/(v^2) ((3*v))/(u*v) 4.计算如下表达式: (1) (2) (3-5*i)*(4+2*i) (2-8*i) 5.判断下面语句的运算结果。 (1) 4 < 20

(2) 4 <= 20 (3) 4 20 (4) 4 20 (5) 'b'<'B' 4 < 20 , 4 <= 20,4 20,4 20,'b'<'B' 6.设,,,,判断下面表达式的值。 (1) (2) (3) (4) (5) (6) 395837; a><>>> 7.编写脚本,计算上面第2题中的表达式。 ('(60)='); ((60)) ('(3)='); ((3)) ('(3*4)='); ((3*4)) 8.编写脚本,输出上面第6题中的表达式的值。395837;

《光学教程》考试练习题及答案

《光学教程》考试练习题 、单项选择和填空题 2 ?在菲涅耳圆屏衍射的几何阴影中心处 A 永远是个亮点,其强度只与入射光强有关 E 永远是个亮点,其强度随着圆屏的大小而变 C 有时是亮点,有时是暗点。 3 .光具组的入射光瞳、有效光阑,出射光瞳之间的关系一般为 A 入射光瞳和有效光阑对整个光具组共轭。 E 出射光瞳和有效光阑对整个光具组共轭。 C 入射光瞳和出射光瞳对整个光具组共轭。 4 ?通过一块二表面平行的玻璃板去看一个点光源,则这个点光源显得离观察者 A 远了 B 近了 C 原来位置。 5 ?使一条不平行主轴的光线,无偏折(即传播方向不变)的通过厚透镜,满足的条件是入射光线必须通过 A 光心 B 物方焦点 C 物方节点 D 象方焦点 6. 一薄透镜由折射率为1.5的玻璃制成,将此薄透镜放在折射率为 4/3的水中。则此透镜的焦距数值就变成 原来在空气中焦距数值的: A 2 倍 B 3 倍 C 4 倍 D 1.5/1.333 倍 7. 光线由折射率为 m 的媒质入射到折射率为 n 2的媒质,布儒斯特角i p 满足: A . Sin i p = n 1 / n 2 B 、Sin i p = n 2 / n 1 C 、tg i p = n 1 / n 2 D 、tgi p = n 2 / n 1 &用迈克耳逊干涉仪观察单色光的干涉,当反射镜 M 1移动0?1mm 时,瞄准点的干涉条纹移过了 400条,那 么所用波长为 部分的顶点恰与右边相邻的直线部分的连续相切,由图可见二件表面: A 、有一凹陷的槽,深为 4 λ B 、 有一凹陷的槽,深为 2 λ C 、 有一凸起的埂,高为 4 λ D 、 有一凸起的埂,高为 2 1 ?将扬氏双缝干涉实验装置放入折射率为 n 的介质中,其条纹间隔是空气中的 B ?. n 倍 1 C 丄倍 A5000? 9.一波长为 之间的距离为 B4987? C2500? 5000?的单色平行光,垂直射到 3mm ,则所用透镜的焦距为 B 60cm C 30mm D 三个数据都不对 0.02Cm 宽的狭缝上,在夫琅禾费衍射花样中心两旁第二条暗纹 A 60mm 10. 光电效应中的红限依赖于: A 、入射光的强度 C 、金属的逸出功 11. 用劈尖干涉检测二件的表B 、 D 、 当波长为λ D 30cm. 入射光的频率 入射光的颜色 的单色光垂直入射时, 观察到干涉条纹如图, 图中每一条纹弯曲

全新版大学英语综合教程1课后答案

Key to Exercises (unit 1) Vocabulary: I. 1). respectable 2) .agony 3). put down 4). sequence 4). rigid 5). hold back 6). distribute 7). off and on 8). vivid 9). associate 10). finally 11). turn in 12). tackle 2. 1) has been assigned to the newspaper’s Paris office 2) was so extraordinary that I didn’t know whether to believe him or not 3) a clear image of how she would look in twenty year s’ time 4) gave the command the soldiers opened fire 5) buying bikes we’ll keep turning them out 3.1) reputation/rigid / to inspire 2) and tedious / what’s more / out of date ideas 3) compose / career / avoid showing / hardly hold back II. 1). composed 2). severe 3) agony 4). extraordinary 5). recall 6). command 7). was violating 8). anticipate III. 1. at 2. for 3. of 4. with 5. as 6. about 7. to 8. in 9. from 10. on/upon Comprehensive Exercises (A) (1) hold back (2) tedious (3) scanned (4) recall (5) vivid (6) off and on (7) turn out/in (8) career (B) (1) last (2) surprise (3) pulled (4) blowing (5) dressed (6) scene (7) extraordinary (8)image (9)turn (11) excitement II. Translation 1 1) As it was a formal dinner party, I wore formal dress, as Mother told me to. 2) His girlfriend advised him to get rid of /get out of his bad habit of smoking before it took hold. 3) Anticipating that the demand for electricity will be high during the next few months, they have decided to increase its production. 4) It is said that Bill has been fired for continually violating the company’s

ml基础教程课后习题解答

X M L基础教程课后习 题解答 内部编号:(YUUT-TBBY-MMUT-URRUY-UOOY-DBUYI-0128)

XML基础教程课后习题 习题一 1.答:HTML是用来编写Web页的语言、不允许用户自定义标记,HTML体现数据的显示格式。XML描述数据的组织结构、可自定义标记,其标记名称是对标记所包含的数据内容含义的抽象,而不是数据的显示格式。 2.答:使用UTF-8保存 5.答:(1)不可以,(2)可以,(3)不可以 6.答:: time { display:block;font-size:18pt;font-weight:bold } hour { display:line;font-size:16pt;font-style:italic } mimute { display:line;font-size:9pt;font-weight:bold } 习题二1.答:(1)使用ANSI编码。(2)可以。(3)不合理。 2.答:不相同。 3.答:(1)和(2)。 4.答:。

5.答:“root”标记包含的文本内容都是空白字符。“a1”标记包含的文本内容:。“a2”标记包含的文本内容: 子曰"有朋自远方来,不亦乐乎"。 习题三1.答:一个规范的XML文件如果和某个DTD文件相关联,并遵守该DTD文件规定的约束条件,就称之为有效的XML文件。 2.答:DTD文件的编码必须和其约束的XML文件的编码相一致。 3.答:无关。 4.答:(1) 使用SYSTEM文档类型声明的格式: (2) 使用PUBLIC文档类型声明的格式: 5.答:一定。 6.答:(1)约束标记“张三”必须有“学号”属性 (2)约束标记“张三”必须有“学号”属性,而且学号的属性值是固定的220123。 (3)约束标记“张三”可以有也可以没有“学号”属性。 7.答:ID类型的属性的属性值具有互斥性,即所有ID类型的属性的属性值必须互不相同。 8.答:不合理。 9.答:(1)、(3)和(4)。 10.答,不是有效的。将修改为有效:

《光学教程》(姚启钧)课后习题解答

《光学教程》(姚启钧)习题解答 第一章 光的干涉 1、波长为500nm 的绿光投射在间距d 为0.022cm 的双缝上,在距离180cm 处的光屏上形成干涉条纹,求两个亮条纹之间的距离。若改用波长为700nm 的红光投射到此双缝上,两个亮纹之间的距离为多少?算出这两种光第2级亮纹位置的距离。 解:1500nm λ= 7011180500100.4090.022 r y cm d λ-?= =??= 改用2700nm λ= 7022180700100.5730.022 r y cm d λ-?= =??= 两种光第二级亮纹位置的距离为: 21220.328y y y cm ?=?-?= 2、在杨氏实验装置中,光源波长为640nm ,两狭缝间距为0.4mm ,光屏离狭缝的距离为50cm ,试求:⑴光屏上第1亮条纹和中央亮纹之间的距离;⑵若P 点离中央亮纹为0.1mm 问两束光在P 点的相位差是多少?⑶求P 点的光强度和中央点的强度之比。 解:⑴ 7050640100.080.04 r y cm d λ-?= =??= ⑵由光程差公式 210 sin y r r d d r δθ=-==

0224 y d r π π π?δλ λ ?= = ?= ⑶中央点强度:2 04I A = P 点光强为:2 21cos 4I A π?? =+ ?? ? 012 (1)0.8542I I =+= 3、把折射率为1.5的玻璃片插入杨氏实验的一束光路中,光屏上原来第5级亮条纹所在的位置变为中央亮条纹,试求插入的玻璃片的厚度。已知光波长为7610m -? 解: 1.5n =,设玻璃片的厚度为d 由玻璃片引起的附加光程差为:()1n d δ'=- ()15n d λ-= ()76455 61061061010.5 d m cm n λ---==??=?=?- 4、波长为500nm 的单色平行光射在间距为0.2mm 的双缝上。通过其中一个缝的能量为另一个的2倍,在离狭缝50cm 的光屏上形成干涉图样,求干涉条纹间距和条纹的可见度。 解: 7050500100.1250.02 r y cm d λ-?= =??= 由干涉条纹可见度定义: 12min 2min 1221Max Max A A I I V I I A A ?? ? -??= =+??+ ??? 由题意,设22 122A A = ,即 1 2 A A =

新标准大学英语综合教程4课后答案

综合教程4课后答案 Handouts and Key to book4 unit 1-4 Unit 1 Active reading (1) Looking for a job after university? First, get off the sofa Background information About the passage: This is an article by an Education Correspondent, Alexandra Blair, published in September 2008 in The Times, a long-established British quality newspaper. In Europe generally, and in Britain in particular, for a number of years there has been a r i s i ng nu mber of stude nts who go to uni vers ity and therefore more new graduates seeking employment. However, for many graduates finding a job became harder in 2008 - 2009 because the economic downturn - then a rcccssion - meant that many employers werereducing their workforce. After their final exams, some students rested in the summer before looking for jobs and then they found that it was difficult to find employment in their field or at the level they wanted. The

大学计算机基础教程课后习题答案.doc

第一章 1.1946 2.大规模集成电路 3.计算机辅助设计、计算机辅助教学、计算机辅助制造、计算机辅助测试、计算机辅助教育、操作系统 4.人工智能 5.存储程序工作原理 6.运算器 7.RAM 8.逻辑 9.字长 10.位、字节 11.位、字节 12.1024、1024、1024*1024 13.1 14.2 15.48H、65H、97H、32 16.288 17.操作系统 18.程序 19.高级语言 20.机器 21.编译、解释 22.应用、系统 23.输入、输出设备 24 .硬盘 25.高速缓冲存储器 26.传染性 27.2 28.R (文科不做) 29.111111 K 7f (文科不做) 30.213、D5 (文科不做) 第二章 1.255 2.隐藏 3.存档 4.内存条、硬盘 5.Alt

6.[cttl+shift]> [shift+o] [ctrl+space] [ctrl+o] 7.[alt+F4] 8.后台 9.[Shift]> [Ctrl] 10.[Shift] 11.[Ctrl] 12.回收站 13.msconfig 14.单击该按钮会弹出对话框、有下级了菜单、当前状态不可用 15.[Ctrl+Esc]或[win ] 16.最大化或还原 17.分辨率 18.刷新频率 19.磁盘清理 20.[Ctrl+Shift+Delete] 第三章 1.doc 2.我的文档 3.拼写错误、语法错误 4.一行、一段、全部 5.页面 6.回车符号 7.[Alt+Tab] 8.[Ctrl+O] 9.[Ctrl+N] 10.页眉页脚 第四章 1.3、255 2.65536、256 3.[Ctrl+; ]> [Ctrl+Shift+;] 4.= 5.40833 6. 3 7.[ Ctrl ] 8.$ 9.地址栏 10.F2 第五章

全新版大学英语综合教程(第二版)1课后题答案全集(可打印)

【一】全新版大学英语综合教程1课后 题 Unit 1 Growing Up Part II Language Focus Vocabulary Ⅰ.1. 1.Respectable 2.agony 3.put…down 4.sequence 5.hold back 6.distribute 7.off and on 8.vivid 9.associate 10.finally 1.turn in 2.tackle 2. 1.has been assigned to the newspaper’s Paris office. 2.was so extraordinary that I didn’t know whether to believe him or not. 3. a clear image of how she would look in twenty years’ time. 4.gave the command the soldiers opened fire. 5.buying bikes we’ll keep turning them out. 3. 1.reputation, rigid, to inspire 2.and tedious, What’s more, out of date ideas https://www.doczj.com/doc/8613372118.html,pose, career, avoid showing, hardly hold back Ⅱ. https://www.doczj.com/doc/8613372118.html,posed 2.severe 3.agony 4.extraordinary 5.recall https://www.doczj.com/doc/8613372118.html,mand 7.was violating 8.anticipate Ⅲ. 1.at 2.for 3.of 4.with 5.as 6.about 7.to 8.in, in

全新版大学英语综合教程4【第二版】完整版课后答案

全新版大学英语综合教程4【第二版】习题答案 主编:李荫华 上海外语教育出版社 Unit 1 Part II Text A lexf Organization Parts Paragraphs Main Ideas Part One Paras 1-2 Introduction — Both Napoleon's and Hitler's military campaigns failed because of the severity of the Russian winter. Part Two Paras 3-11 Napoleon's military campaign against Russia Part Three Paras 12-20 Hitler's military campaign against the Soviet Union Part Four Para 21 Conclusion—the elements of nature must be rekoned with in any military campaign. 2. Sections Paragraphs Main Ideas Section One Paras 12-13 Hitler's blitzkrieg against Russia and Stalin's scorched earth policy Section Two Paras 14-18 the battles fought at Leningrad, Moscow and Stalingrad Section Three Paras 19-20 the Russian counter-offensive and the outcome of the war Vocabulary I. 1. 1) alliance 2) at the cost of 3) stroke 4) limp 5) minus 6) regions 7) declarations 8) siege 9) raw 10) bide his time 11) have taken their toll 12) in the case of 2. 1) is faced with 2) get bogged down 3) is pressing on / pressed on 4) drag on 5) get by 6) dine out 7) have cut back 8) get through 3. 1) The rapid advance in gene therapy may lead to the conquest of cancer in the near future. 2)Production in many factories has been brought to a halt by the delayed arrival of raw materials due to the dock workers’ strike 3)Sara has made up her mind that her leisure interests will/should never get in the way of her career. 4) Obviously the reporter's question caught the foreign minister off guard. 5)The introduction of the electronic calculator has rendered the slide rule out of date /obso lete. 4.1) Being faced with an enemy forces much superior to ours, we had to give up the occupation of big cities and retreat to the rural and mountainous regions to build up our bases. 2) Unity is crucial to the efficient operation of an organization. Failure to reckon with this problem will weaken its strength. In many cases,work may be brought to a halt by constant internal struggle in an organization. 3) The Red Army fought a heroic battle at Stalingrad and won the decisive victory against the Germans. In fact, this battle turned the tide in the Second World War. During this famous battle, the Soviet troops withstood the German siege and weakened the German army by launching a series of counterattacks.

相关主题
文本预览
相关文档 最新文档