THE LARGE INTEGERCASE STUDYIN C++Advanced Placement ProgramTTHE COLLEGE BOARDAP Computer ScienceNATIONAL OFFICEMiddle StatesMary Alice GilliganSuite 410, 3440 Market StreetPhiladelphia, PA 19104-3338(215) 387-7600MidwestBob McDonough/Paula HerronSuite 401, 1800 Sherman AvenueEvanston, IL 60201-3715(847) 866-1700New EnglandFred Wetzel470 Totten Pond RoadWaltham, MA 02154-1982(617) 890-9150SouthGeoffrey Freer/Tom NewSuite 250, 2970 Clairmont RoadAtlanta, GA 30329-1639(404) 636-9465COLLEGE BOARD REGIONAL OFFICESSouthwestPaul Williamson/Frances Brown/Mondy RaibonSuite 1050, 98 San Jacinto BoulevardAustin, TX 78701-4039(512) 472-0231WestLindy Daters/Claire PeltonSuite 480, 2099 Gateway PlaceSan Jose, CA 95110-1017(408) 452-1400Canada (AP Program Only)George Ewonus212-1755 Springfield RoadKelowna, B.C., Canada V1Y 5V5(250) 861-9050Wade Curry • Philip Arbolino • Charlotte Gill • Frederick Wright45 Columbus Avenue • New York, NY 10023-6992 • (212) 713-8000This booklet was produced by Educational Testing Service (ETS), which develops and administers theexaminations of the Advanced Placement Program for the College Board. The College Board andEducational Testing Service (ETS) are dedicated to the principle of equal opportunity, and their programs,services, and employment policies are guided by that principle.Founded in 1900, the College Board is a not-for-profit educational association that supports academic preparation and transition to highereducation for students around the world through the ongoing collaboration of its member schools, colleges, universities, educationalsystems, and organizations. In all of its activities, the Board promotes equity through universal access to high standards of teaching andlearning and sufficient financial resources so that every student has the opportunity to succeed in college and work. The College Boardchampions — by means of superior research; curricular development; assessment; guidance, placement, and admission information;professional development; forums; policy analysis; and public outreach — educational excellence for all students.Copyright © 1997 by College Entrance Examination Board and Educational Testing Service. All rights reserved.College Board, Advanced Placement Program, AP, and the acorn logo are registeredtrademarks of the College Entrance Examination Board.THE COLLEGE BOARD: EDUCATIONAL EXCELLENCE FOR ALL STUDENTSAdvanced PlacementComputer ScienceThe Large IntegerCase Study in C++A Manual for StudentsThe AP Program wishes to acknowledge and to thankOwen Astrachan of Duke University for developing this case studyand the accompanying documentation.Please note that reproduction of this document is permitted for face-to-face teaching purposes only.This is the premiere posting of the Advanced Placement Computer ScienceLarge Integer Case Study in C++. Comments and/or suggestions regardingthis material should be sent to Gail Chapman at gchapman@ets.org.For more information about AP Computer Science, see theAP Computer Science section of College Board Online (CBO):http://www.collegeboard.org/ap/computer-science/html/indx001.htmlCollege Board Online also has a publications store where you can placeorders for College Board and AP publications. The AP Aisle of theCollege Board Online store can be found at:http://cbweb2.collegeboard.org/shopping/CONTENTSLARGE INTEGER CASE STUDY IN C++Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1Problem Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1Description of the Calculator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2Study Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3Specification of BigInt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4Study Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6Solution Narrative . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7Design Goals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7Overall Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8Error Handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9Study Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10Formal Specifications for BigInt Functions . . . . . . . . . . . . . . . . . . . . . . . . . . 11Data Structure Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13Choosing a data repr
đang được dịch, vui lòng đợi..
![](//viimg.ilovetranslation.com/pic/loading_3.gif?v=b9814dd30c1d7c59_8619)