⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 preface

📁 书名:C语言科学与艺术,以前交钱下载的
💻
📖 第 1 页 / 共 2 页
字号:
of that approach is reflected in the following two features that setthis book apart from other introductory texts:  1.  Libraries and modular development -- essential concepts in      modern programming -- are covered in considerable detail early      in the presentation. Part II focuses entirely on the topics of      libraries, interfaces, abstractions, and modular development.      Students learn how to use these techniques effectively before      they learn about arrays.  2.  The text demonstrates the power of libraries by using them.      It is one thing to tell students that libraries make it      possible to hide complexity.  It is quite another to      demonstrate that concept.  This text introduces several new      libraries that hide details from the students until they are      ready to assimilate them.  The libraries give students th e      power to write useful programs that they could not develop on      their own.  Later chapters reveal the implementation of those      libraries, thereby allowing students to appreciate the power      of abstraction.In 1992, I attempted to teach the introductory course using only theANSI libraries.  The results were not encouraging.  Each new topicrequired that the student understand so much about the rest of C thatthere was no effective way to present the material.  For example,students had to understand the mechanics of arrays, pointers, andallocation before they could use string data in any interesting way,even though string manipulation is simpler conceptually.  My beststudents managed to understand what was going on by the end of thequarter.  Most, however, did not.  Since we introduced the library-basedapproach in 1993, students have assimilated the material more easily andlearned much more about computer science.The library interfaces and associated implementations used in this textare reprinted in Appendix B, which also gives instructions for obtainingthe source code electronically through anonymous FTP (File TransferProtocol).THE ORDER OF PRESENTATIONThis book presents topics in the same order as Stanford's introductorycourse, except for the material in Chapter 17, which we cover in thesecond course.  Depending on your audience and the goals of your course,you may want to vary the order of presentation.  The following notesprovide an overview of the chapters and indicate some of the moreimportant dependencies.Chapter 1 traces the history of computing and describes the programmingprocess.  The chapter requires no programming per se but provides thecontextual background for the rest of the text.I have designed Chapters 2 and 3 for students with little or nobackground in programming.  These chapters are conceptual in theirapproach and focus on problem solving rather than on the details of theC language.  When new students are faced with detailed rules of syntaxand structure, they concentrate on learning the rules instead of theunderlying concepts, which are vastly more important at this stage.  Ifyour students already know some programming, you could move much morequickly through this material.Chapters 2 and 3 are informal in their approach and concentrate ondeveloping the student's problem-solving skills.  Along the way, theyintroduce several basic statement forms and control structures, but onlyas idioms to accomplish a specific task.  Chapter 4 adds formalstructure to this topic by describing each statement form in turn,detailing its syntax and semantics.  The chapter also includes anextensive discussion of Boolean data.Chapter 5 introduces functions and procedures.  It begins with simpleexamples of functions and then continues with increasingly sophisticatedexamples.  The mechanics of parameter passing are discussed in aseparate section that includes many diagrams to help students follow theflow of data from one function to another.  The chapter ends with asignificant programming example that illustrates the concept of stepwiserefinement.The algorithmic concepts presented in Chapter 6 are fundamental tocomputer science but may not be required for all students.  If youraudience consists of engineers or potential computer science majors, thematerial will prove extremely valuable.  For less technical audiences,however, you can eliminate much of this material without disturbing theflow of the presentation.I have found that integrating graphics in the introductory course is agreat way to increase student interest in the material.  Chapter 7exists for that reason.  At this stage, students have learned themechanics of functions but have no burning need to write them.  Lettingstudents draw complex pictures on the screen gives them that incentive.The graphics library is implemented for several of the major programmingenvironments and can therefore be used in most institutions.Chapter 8 has two themes, which are in some sense separable.  The firstpart of the chapter discusses design criteria for interfaces and isessential for anyone who needs to understand how modern programmingworks.  The second part of the chapter applies those principles to builda random number library.  The random.h interface itself is lessimportant than the general principles, although use of the random numberlibrary is required for many exercises throughout the text.Chapter 9 introduces strings as an abstract type and represents, to acertain extent, the cornerstone of the library-based approach.  By usinga dynamic string library, students can easily write programs thatperform sophisticated string manipulation, even though they do not yetunderstand the underlying representation, which is covered in Chapter14.  Introducing strings at this point in the presentation enablesstudents to write much more exciting programs that they could otherwise.On a first reading, it is easy to miss the purpose of Chapter 10, whichappears to be an extension of the discussion of strings begun in Chapter9.  The fundamental value of Chapter 10 does not lie in the Pig Latinprogram, which is more fun than it is practical.  The entire reason forthe example is that it provides the motivation to build the scannerinterface used to separate words on the input line.  The scanner moduleproves its usefulness over and over again, not only in the first course,but in subsequent courses as well.  It is the most practical toolstudents create in the course and therefore serves as a compellingexample of the value of modularity.Chapters 11 through 16 introduce the fundamental compound structures --arrays, records, pointers, and files -- in an order that has worked wellin practice.  Because the base language is C, it is important to presentpointers as soon as possible after introducing arrays so that you canemphasize the connections between them.  Moreover, having establishedthese concepts, it is then possible in Chapter 14 to consider stringdata more closely, thereby revealing the underlying representation thatwas concealed by the abstract definition.  Chapter 16 integrates thefundamental data structures with the construction of a data-driventeaching machine, which is the most sophisticated example of programmingpresented in the text.Chapter 17 includes three important topics that often appear in thefirst programming course: recursion, abstract data types, and analysisof algorithms.  At Stanford, which is on the quarter system, we teachall these topics in the second course.  If you decide to teach recursionin the first course, I strongly recommend that you do so early enough toallow students time to assimilate the material.  One possibility is todiscuss recursive functions immediately after Chapter 5 and recursivealgorithms after Chapter 6.  Another approach is to cover recursion andanalysis of algorithms together at the end of Chapter 12.INSTRUCTOR'S MANUALThe Instructor's Manual contains supplemental materials including acourse syllabus, suggestions for lecture design, sample assignments andexaminations, and solutions to all programming exercises.  In additionto the printed manual, instructor's who adopt this text can retrieveelectronic copies of solution sets and related materials.  For detailson obtaining solutions, please contact your local Addison-Wesleyrepresentative.  All other supplemental material is available on-line.For explicit instructions see Appendix B.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -