在面向对象编程中,程序被看作是相互协作的______,每个对象都是某个类的实例,所有的类构成一个通过继承关系相联系的层次结构。
查看答案
Text 2 I did not know the city at all and, what is more, I couldn’t speak a word of the language. After having spent my first day sight-seeing in the town-center, I decided to lose my way deliberately on my second day, since I believed that this was the surest way of getting to know my way around. I got on the first bus that passed and descended some thirty minutes later in what must have been a suburb. The first two hours passed pleasantly enough. I discovered mysterious little book-shops in back streets and finally arrived at a market-place where I stopped and had coffee in an open-air calf. Then I decided to get back to my hotel for lunch. After walking about aimlessly for some time, I determined to ask the way. The trouble was that the only word I knew of the language was the name of the street in which I lived — and even that I pronounced badly. I stopped to asked a friendly-looking newspaper-seller. He smiled and handed me a paper. I shook my head and repeated the name of the street and he thrust the paper into my hands. Seeing that it would be impossible to argue about the matter, I gave him some money and went on my way. The next person I asked was an old lady who was buying vegetables. She was very hard of hearing and I repeated the word several times. When she finally heard me, she seemed to take offence and began shouting and shaking her walking-stick at me. I hurried away quickly and was relieved to see a policeman on a corner. He certainly would be able to help me. The policeman listened attentively to my question, smiled and gently took me by the arm. There was a distant look in his eyes as he pointed left and right and left again. He glanced at me for approval, and repeated the performance. I nodded politely and began walking in the direction he pointed. About an hour passed and I noticed that the houses were getting fewer and green fields were appearing on either side on me. I had come all the way into the country. The only thing left for me to do was to find the nearest railway-station! It wasn’t until ______ that he started getting back to his hotel for lunch.
A. he had determined to ask the way
B. he had realized that the only word he knew was the name of the street where his hotel was located
C. he had enjoyed himself there for a couple of hours
D. he had visited a small book store
设在工程中有一个标准模块,其中定义了如下记录类型: Type Books Name As String (10 TelNum As String *20 End Type 在窗体上添加一个名为Command1的命名按钮,要求当执行事件过程Command1 Click时,在顺序文件Person.txt中写入一条记录。请在横线中填入适当的内容,将程序补充完整。 Private Sub Command1_Click() Dim B As ______ Open."c:\Person.txt" For Output As #1 B.Name=InputBox(“输入姓名”) B.TelNum=InputBox(“输入学号”) Write#1, B.Name, B.TelNum Close #1 End Sub
在窗体上绘制一个名称为Commandl的命令按钮,然后编写如下事件过程: Private Sub Commandl Click() c="ABCD" For n=1 To 4 Print ______ Next End Sub 程序运行后,单击命令按钮,要求在窗体上显示如下内容: D CD BCD ABCD 则在横线处应填入的内容为
A. Left(c,n)
B. Right(c,n)
C. Mid(c,n,1)
D. Mid(c,n,n)
在窗体上画一个名称为Command1的命令按钮,然后编写如下事件过程: Private Sub Command1_Click() c=1234 c1 = Trim(Str(c)) For i = 1 To 4 Print ____ Next End Sub 程序运行后,单击命令按钮,要求在窗体上显示如下内容 1 12 123 1234 则在下划线处应填入的内容为
A. Right(c1,i)
B. Left(c1,i)
C. Mid(c1,i,1)
D. Mid(c1,i,