反复出现的主题

Patricia Townsend
{"title":"反复出现的主题","authors":"Patricia Townsend","doi":"10.4324/9780429052736-12","DOIUrl":null,"url":null,"abstract":"In Chapter 9, we learned how while loops can be used to command a computer to execute millions of instructions without having to actually type in millions of instructions. Now that we know how to make a computer perform millions of operations, we would like to be able to write programs that process millions of pieces of information. We have seen how to manipulate small quantities of information in a program. Names have been essential to this process. In order to work with information, we must first associate a name with the value or object to be manipulated so that we can write instructions telling the computer to apply methods or operators to the data. It is, however, hard to imagine writing a program containing millions of instance variable declarations! There must be another way. We encounter programs that process large collections of information every day. The book you are reading contains roughly a million words. The program used to format this book has the ability to manage all of these words, decide how many can fit on each page, etc. When you go to Google and search for web pages about a particular topic, the software at Google somehow has to examine data describing millions of web pages to find the ones of interest to you. When you load a picture from your new 8 megapixel digital camera into your computer, the computer has to store the 8 million data values that describe the colors of the 8 million dots of color that make up the image and arrange to display the right colors on your screen. In this and the following chapter, we will explore two very di↵erent ways of manipulating large collections of information in a program. The technique presented in the following chapter involves a new feature of the Java language called arrays. The technique presented in this chapter, on the other hand, is interesting because it does not involve any new language features. It merely involves using features of Java you already know about in new ways. The technique we discuss in this chapter is called recursion. Recursion is a technique for defining new classes and methods. When we define new classes and methods, we usually use the names of other classes and methods to describe the behavior of the class being defined. For example, the definition of the very first class we presented, TouchyButton …","PeriodicalId":415904,"journal":{"name":"Creative States of Mind","volume":"363 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2019-03-04","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":"{\"title\":\"Recurring Themes\",\"authors\":\"Patricia Townsend\",\"doi\":\"10.4324/9780429052736-12\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"In Chapter 9, we learned how while loops can be used to command a computer to execute millions of instructions without having to actually type in millions of instructions. Now that we know how to make a computer perform millions of operations, we would like to be able to write programs that process millions of pieces of information. We have seen how to manipulate small quantities of information in a program. Names have been essential to this process. In order to work with information, we must first associate a name with the value or object to be manipulated so that we can write instructions telling the computer to apply methods or operators to the data. It is, however, hard to imagine writing a program containing millions of instance variable declarations! There must be another way. We encounter programs that process large collections of information every day. The book you are reading contains roughly a million words. The program used to format this book has the ability to manage all of these words, decide how many can fit on each page, etc. When you go to Google and search for web pages about a particular topic, the software at Google somehow has to examine data describing millions of web pages to find the ones of interest to you. When you load a picture from your new 8 megapixel digital camera into your computer, the computer has to store the 8 million data values that describe the colors of the 8 million dots of color that make up the image and arrange to display the right colors on your screen. In this and the following chapter, we will explore two very di↵erent ways of manipulating large collections of information in a program. The technique presented in the following chapter involves a new feature of the Java language called arrays. The technique presented in this chapter, on the other hand, is interesting because it does not involve any new language features. It merely involves using features of Java you already know about in new ways. The technique we discuss in this chapter is called recursion. Recursion is a technique for defining new classes and methods. When we define new classes and methods, we usually use the names of other classes and methods to describe the behavior of the class being defined. For example, the definition of the very first class we presented, TouchyButton …\",\"PeriodicalId\":415904,\"journal\":{\"name\":\"Creative States of Mind\",\"volume\":\"363 1\",\"pages\":\"0\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2019-03-04\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"0\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"Creative States of Mind\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.4324/9780429052736-12\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"Creative States of Mind","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.4324/9780429052736-12","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0

摘要

在第9章中,我们学习了如何使用while循环命令计算机执行数百万条指令,而不必实际输入数百万条指令。既然我们知道如何使计算机执行数百万种操作,我们就希望能够编写处理数百万条信息的程序。我们已经看到了如何在程序中处理少量的信息。在这个过程中,名字是必不可少的。为了处理信息,我们必须首先将名称与要操作的值或对象联系起来,以便编写指令,告诉计算机对数据应用方法或运算符。然而,很难想象编写一个包含数百万个实例变量声明的程序!一定有别的办法。我们每天都会遇到处理大量信息的程序。你正在读的那本书大约有一百万字。用于格式化这本书的程序有能力管理所有这些单词,决定每页上可以容纳多少单词,等等。当你去谷歌搜索关于某个特定主题的网页时,谷歌的软件不知何故必须检查描述数百万个网页的数据,以找到你感兴趣的网页。当你从新的800万像素数码相机上下载一张图片到你的电脑时,电脑必须存储800万个数据值,这些数据值描述了组成图像的800万个彩色点的颜色,并安排在你的屏幕上显示正确的颜色。在本章和下一章中,我们将探讨在程序中操作大量信息集合的两种截然不同的方式。下一章介绍的技术涉及Java语言的一个新特性,称为数组。另一方面,本章介绍的技术很有趣,因为它不涉及任何新的语言特性。它只涉及以新的方式使用您已经知道的Java特性。我们在本章讨论的技术称为递归。递归是一种定义新类和新方法的技术。当我们定义新的类和方法时,我们通常使用其他类和方法的名称来描述所定义的类的行为。例如,我们展示的第一个类TouchyButton的定义…
本文章由计算机程序翻译,如有差异,请以英文原文为准。
查看原文
分享 分享
微信好友 朋友圈 QQ好友 复制链接
本刊更多论文
Recurring Themes
In Chapter 9, we learned how while loops can be used to command a computer to execute millions of instructions without having to actually type in millions of instructions. Now that we know how to make a computer perform millions of operations, we would like to be able to write programs that process millions of pieces of information. We have seen how to manipulate small quantities of information in a program. Names have been essential to this process. In order to work with information, we must first associate a name with the value or object to be manipulated so that we can write instructions telling the computer to apply methods or operators to the data. It is, however, hard to imagine writing a program containing millions of instance variable declarations! There must be another way. We encounter programs that process large collections of information every day. The book you are reading contains roughly a million words. The program used to format this book has the ability to manage all of these words, decide how many can fit on each page, etc. When you go to Google and search for web pages about a particular topic, the software at Google somehow has to examine data describing millions of web pages to find the ones of interest to you. When you load a picture from your new 8 megapixel digital camera into your computer, the computer has to store the 8 million data values that describe the colors of the 8 million dots of color that make up the image and arrange to display the right colors on your screen. In this and the following chapter, we will explore two very di↵erent ways of manipulating large collections of information in a program. The technique presented in the following chapter involves a new feature of the Java language called arrays. The technique presented in this chapter, on the other hand, is interesting because it does not involve any new language features. It merely involves using features of Java you already know about in new ways. The technique we discuss in this chapter is called recursion. Recursion is a technique for defining new classes and methods. When we define new classes and methods, we usually use the names of other classes and methods to describe the behavior of the class being defined. For example, the definition of the very first class we presented, TouchyButton …
求助全文
通过发布文献求助,成功后即可免费获取论文全文。 去求助
来源期刊
自引率
0.00%
发文量
0
期刊最新文献
The Pre-Sense Postscript Out into the World Creativity, Aggression and Destructiveness The Artist’s Internal Frame
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
现在去查看 取消
×
提示
确定
0
微信
客服QQ
Book学术公众号 扫码关注我们
反馈
×
意见反馈
请填写您的意见或建议
请填写您的手机或邮箱
已复制链接
已复制链接
快去分享给好友吧!
我知道了
×
扫码分享
扫码分享
Book学术官方微信
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术
文献互助 智能选刊 最新文献 互助须知 联系我们:info@booksci.cn
Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。
Copyright © 2023 Book学术 All rights reserved.
ghs 京公网安备 11010802042870号 京ICP备2023020795号-1