Friday, May 31, 2019

Bowing to Seniority :: Documentary Journalism Sports Basketball Papers

Bowing to SeniorityWith the dearth of good centers in college basketball, one would expect that Xavier University would want David westerly, their All-American center who averaged 20 points and 10 rebounds per game as a junior, to return for his senior season. But West did not feel so welcome.Honestly, it felt like they wanted me to leave, West said. not Coach Thad Matta specifically, but most people seemed to be pushing me out the door to the NBA.Eventually, West decided to return for his senior season, and then became part of a dying breed college seniors who get drafted in the first round of the NBA draft. In the last two NBA drafts, high school players and college underclassmen outnumbered the college senior first round picks 19-13, with solely four college seniors going in the first round in the June 2004 draft. In 1999, 13 seniors went in the first round.The number of lottery picks (teams who do not contact the playoffs, the first 14 picks of the draft) shows the disparity mo re clearly with more underclassmen being drafted in the lottery by an 11 to 5 margin. Before the New siege of Orleans Hornets took West with the 18th pick of the 2003 NBA Draft, he had a successful senior season at Xavier, where he was an All-American and the Associated Press Collegiate Player of the Year. As minor as eight years ago, West probably would perk up been a top five pick as prospects were still valued more for their capability to contribute right away rather than their potential. But because of what Mississippi State University Coach Rick Stansbury calls a disturbing trend, that of underclassmen entering the draft with greater and greater frequency, West fell completely out of the lottery. Some argue that the slide through the draft of seniors like West has to compete with not only the development of college underclassmen entering the draft, but also international prospects who have the upside to be superstars, even though many teams have seen very little of them act ually play. However, West does not think that the international players have affected the draft that much.If you can play, you can play, said West. Im not worried about what (European) guys can do. American guys have shown what they can do. In the end, if you can play, theyre not going to let you go. Over the past 10 years, the mindset of the NBA prospect has changed.

Thursday, May 30, 2019

Jackie Robinson and the Struggle for Equality in Baseball Essay

Jackie Robinson and the Struggle for Equality in BaseballBaseball has always been known as Americas pastime. But Americas pastime, along with Americas past, name both been saturated with the brutal force of racism. For hundreds of years, from the time of slavery until the middle of the 20th century, African-American children rounded up their friends and headed to the baseball diamond. There, for thousands of young black players, the intuitive feeling of the grass, the cloud of dust that formed when running the ninety feet between bases, and the feeling of safely sliding into homeplate for a run marked the glimmer of fun and tempestuousness in an otherwise dreary day. However, due to the color of their skin, black children were not awarded these luxuries. For aspiring black ballplayers, a baseball field with bats and actual baseballs would be a dream come true. Instead they were forced to play with rocks and sticks in an alley or run-down sandlot. But this would never stop t hem, the thrill and rejoicing of baseball was too extensive. When playing, it seemed as if all their worries and fears floated away and only one thing mattered...baseball. Baseball was their escape, their livelihood, and the topic of all their hopes and dreams. For young black ballplayers, baseball was more more than a game. The word aspiring must also be clarified. See, for black players, one undeniable truth was always present. No matter how impregnable you were, no matter how many homeruns or stolen bases you had, how hard you hit the ball or how fast you threw the ball, no matter if you had the ability to play with the best of the best, Ty Cobb, sister Ruth, and Mickey Mantle, there was one thing you never had...the right skin color. The word aspiring did not exist in the... ...In 1972, Jackie Robinson died, but his bequest never will. Today, the effects of Jackie Robinson can be seen wherever one looks. On the covers of Sports Illustrated, ESPN, Rolling Stones, a nd even the Wall Street Journal, African-Americans are now seen in a much different light than in the fifties. Since Jackie Robinson integrated baseball in 1947, black society in America has truly broken barriers. Although arguable, it is my contention that the 54 years after the first day Jackie Robinson stepped up to the plate was the best 54 years in African-American improvements of all time. More importantly than improvements in black America, are the improvements in all of America, in every facet of life. Jackie Robinson was not only great at playing baseball, but also great at playing life. Quoting the recent Nike advertising campaign, Thank you Jackie Robinson.

Wednesday, May 29, 2019

Personal Narrative- Victim of Robbery Essay -- Personal Narrative

Personal Narrative- Victim of RobberyMy story started about a week ago. I was heading to bed early, because I was tired from a long day with plans to wake up a few hours before phratry to review for a test. As I closed my books for the evening and headed to bed around midnight, petty did I know something was going on outside. A little later that night someone entered my garage, which was so conveniently unlocked. They first rummaged through my dads van outside and I think they stole his coat, a tape and a few rolls of film. They also sifted through my moms car looking for something to steal, only to find a few motivational tapes. strike enough they passed those including one on Getting Rid Of Guilt. When they got into my car however, they stubborn to take most of what I had. They stole my CD player, taking part of my daunt with it. They also took most of my CD collection and the liner to my new Columbia coat. They even took my flashlight. They then vanished as quickly as they ha d come. My mom woke me the following morning. She had decided to bring me breakfast in bed...

Fugitive Pieces :: Essays Papers

Fugitive PiecesReport on Fugitive PiecesSearing the mind with stunning images while seducing with radiant prose, this brilliant first novel is a tarradiddle of damaged lives and the indestructibility of the human spirit. It speaks about loss, about the urgency, pain and ultimate healing power of memory, andabout the redemptive power of love. Its characters come to understand the implacability of the natural world, the impartial nonesuch ofscience, the heartbreak of history. The narrative is permeated with insights about language itself, its power to distort and destroy meaning, and to restore it again to those with stalwart hearts.During WWII, when Jakob Beer is seven, his parents are murdered by Nazi soldiers who combat their Polish village, and his beloved, musically talented 15-year-old sister, Bella, is abducted. Fleeing from the blood-drenched scene, he is magically saved by Greek geologist Athos Roussos, who secretly transports the traumatized boy to his home on the island o f Zakynthos, where they live through the Nazi occupation, suffering privations but escaping the atrocities that decimate Greeces Jewish community. Jakob is haunted by the moment of his parents death the burst door, buttons spilling out of a saucer onto the floor, darkness and his spirit cadaver sorrowfully linked with that of his lost sister, whose fate anguishes him. But he travels in his imagination to the places that Athos describes and the books that this kindly scholar provides. At wars end, Athos accepts a university post in Toronto, and Jakob begins a new life. Yet he remains disoriented and unmoored, trapped by memory and grief, a damaged chromosome the more so after Athos premature death. By then, however, Jakob has discovered his mtier as poet and essayist and strives to find in language the meaning of his life. The miraculous gift of a soul mate in his second wife, voluptuous scholar Michaela, comes late for Jakob. Their marriage is brief, and ends in stunning irony. T he second part of the novel concerns a younger man, Ben, who is profoundly influenced by Jakobs song and goes to the Greek island of Idhra in an attempt to find the writers notebooks after his death. Ben is another damaged soul. The son of Holocaust survivors, he carries their sorrow like a heavy stone. emotionally maimed and fearful, Ben feels that he was born into absence.

Tuesday, May 28, 2019

Habits and Explanation Essay -- Psychology Science Papers

Habits and ExplanationHabits form a crucial part of the everyday conceptual object used to explain normal human activity. However, they have been neglected in debates concerning folk-psychology which have concentrated on propositional attitudes such as beliefs. But propositional attitudes are on the preciselyton one of the many mental states. In this paper, I seek to expand the debate by considering mental states other than propositional attitudes. I conclude that the case for the familiarity and plausibility of the folk-psychological explanation is strengthened when one considers an example from the non-propositional-attitude mental states habits. My main target is the radical eliminativist program. As regards habits, eliminativists could argue in two distinct but related ways. They can either abandon the concept habit altogether or retain the folk-psychological term habit by reducing it to the causal bowed stringed instrument of the observed behavior pattern, as is sometimes d one in social theory. I contend that both of these strategies are defective. The correct way to talk approximately habits is in terms of manifestations and activating conditions, not in terms of causal chains. Hence, if eliminativists take up either of the two arguments given above, they will not succeed. Correspondingly, by the added generality gained through the consideration of habits, the case for folk-psychology is strengthened. If you do something often and in a way which appears settled, you are normally described as having a habit. We presume we have habits as parts of skills, habits of social behaviour, and also deeper ones, like habits of thought. Even those who are good at using Ockhams razor confess sometimes their acceptation of habits. Hume admits that we all have a habit of j... ...s folk science, and belief versus opinion, in The Future of Folk-Psychology Intentionality and Cognitive information, ed. J.D. Greenwood, Cambridge Cambridge University Press, pp. 135- 148.Jackson, F., and Pettit, P., 1990, Program Explanation a general perspective, Analysis, vol. 50, pp. 107-117.Pettit, P., 1993, The Common Mind, Oxford Oxford University Press.Stich, S.P., 1983, From Folk-Psychology to Cognitive Science The Case against Belief, Cambridge Mass. MIT Press.Terrence, H., and Woodward, J., 1985, Folk psychology is here to stay, The Philosophical Review 94, reprinted in The Future of Folk-Psychology Intentionality and Cognitive Science, ed. J.D. Greenwood, Cambridge Cambridge University Press, pp. 149-175.Turner, S., 1994, The Social Theory of Practices Tradition, Tacit Knowledge and Presuppositions, Oxford Polity Press.

Habits and Explanation Essay -- Psychology Science Papers

Habits and ExplanationHabits form a crucial part of the everyday purposeual scheme used to explain normal human activity. However, they be in possession of been neglected in debates concerning phratry-psychology which have concentrated on propositional attitudes such as beliefs. But propositional attitudes are just one of the many mental states. In this paper, I seek to expand the debate by considering mental states other than propositional attitudes. I conclude that the case for the autonomy and plausibility of the folk-psychological explanation is strengthened when one considers an manakin from the non-propositional-attitude mental states habits. My main target is the radical eliminativist program. As regards habits, eliminativists could argue in two distinct but related ways. They can either abandon the concept habit altogether or retain the folk-psychological term habit by reducing it to the causal chain of the observed behavior pattern, as is sometimes make in social theory . I contend that both of these strategies are defective. The correct way to talk about habits is in terms of manifestations and activating conditions, not in terms of causal chains. Hence, if eliminativists take up either of the two arguments given above, they will not succeed. Correspondingly, by the added generality gained through the consideration of habits, the case for folk-psychology is strengthened. If you do something often and in a way which appears settled, you are normally described as having a habit. We assume we have habits as parts of skills, habits of social behaviour, and as well deeper ones, like habits of thought. Even those who are good at using Ockhams razor confess sometimes their acceptance of habits. Hume admits that we all have a habit of j... ...s folk science, and belief versus opinion, in The Future of Folk-Psychology Intentionality and Cognitive Science, ed. J.D. Greenwood, Cambridge Cambridge University Press, pp. 135-148.Jackson, F., and Pettit, P., 1 990, Program Explanation a general perspective, Analysis, vol. 50, pp. 107-117.Pettit, P., 1993, The Common Mind, Oxford Oxford University Press.Stich, S.P., 1983, From Folk-Psychology to Cognitive Science The Case against Belief, Cambridge Mass. MIT Press.Terrence, H., and Woodward, J., 1985, Folk psychology is here to stay, The Philosophical look back 94, reprinted in The Future of Folk-Psychology Intentionality and Cognitive Science, ed. J.D. Greenwood, Cambridge Cambridge University Press, pp. 149-175.Turner, S., 1994, The Social Theory of Practices Tradition, Tacit Knowledge and Presuppositions, Oxford Polity Press.

Monday, May 27, 2019

The Cabin in the Woods

The Cabin in the wood 1. Joss Whedon says that The Cabin in the Woods is your basic horror movie taken apart five kids go to a cabin in the woods to have a fun weekend of partying and possibly sex and are therefore dismembered. Whedon and Goddard have in essence time-tested to create a movie with roots tied to the horror musical musical style it is simply your common slasher movie where the characters are killed off single by one till there is either one person left or none for that matter. The Cabin in the Woods also has ties to other genres such as comedy, this can be seen in scenes such as where they are all sitting around in the main room, playing truth or dare, and Jules is dared to kiss the wolfs head on the wall, also in the scene where Marty has a bong that can retract into a coffee mug. The Cabin in the Woods turns the horror genre on itshead. The film is a satire and payshomageto some ofthe great scary movies from the past such as Sam Raimis Evil Dead and also Dario A rgentos Suspira.Another genre that is incorporated into the movie is sci-fi. We see this when Marty and Dana descend in the lift to where the scientists are, we then see various nightmare characters with some cosmos human and the majority being made up creatures, this is part of the sci-fi genre as it usually contains monsters and mythical creatures that are not found in real life and questions normality. 2.The narrative complex body part of The Cabin in the Woods is linear. It starts with equilibrium where everything is going well, this is seen when all of the 5 are meeting up together getting prepared to start on their journey. This is then followed by disruption where the first character is killed off which would be Jules. The quest for restoration is found in the scene where Dana and Holden go into the lift and scene to stop all of it.The equilibrium being restored can be seen for two inclines, one being that it is restored as the operation is shut down, but the other side b eing that it isnt restored as the whole world ends because of the gods that are unleashed. 3. There are many different representations of gender in The Cabin in the Woods. Firstly, the two women, Jules and Dana, are defined as The Whore and The Virgin which is two opposite ends of the spectrum whose deaths are meant to serve as bookends for the others.The order of deaths is irrelevant except in the case of the women. Jules, as the corrupted whore, has to die first, and Dana, the Virgin, has to die last,thats if she dies at all. As Hadley says, The virgins death is optional as long as its last. The fe virile characters are defined only by their sexuality nothing else about them really matters. In certain scenes Laura Mulveys theory of the male gaze is prevalent. When Dana is getting undressed in her room, Holden finds out that he can see through a window into her room, but she cant.We see the photographic camera follow Dana up and down as she takes off her clothes, then the camera switches back round to Holden, who we see watching her but trying to look outside(a) at the same time. Still, the men dont fare much better with their prescribed roles. They are given the roles of The Athlete, The Scholar, and The Fool. The Athlete is your typical American patron who has a naturally athletic and muscly body and loves sports. The scholar is represented as being a book worm whose only passion is education and practice books and the fool is represented as being basically dumb.

Sunday, May 26, 2019

Object Oriented Programming in Different Languages

OOP with Microsoft optical base . plunder and Microsoft visual C Step by Step by redbreast A. Reynolds-Haertle Microsoft fix 2002 (393 foliates) ISBN 0735615683 This intuitive, self-paced learning title is subsisting to help you master the bedrock of intention- point programming with visual sancti wholenessd. give notice or visual C. Table of Contents OOP with Microsoft ocular Basic . NET and Microsoft optic C . NET Step by Step understructure Chapter 1 Writing Your First Object-Oriented computer program Chapter 2 Creating sort out Instances with Constructors Chapter 3 Creating Fields and PropertiesChapter 4 Working with Methods Chapter 5 use Inheritance to Create Specialized Classes Chapter 6 Designing Base Classes as Abstract Classes Chapter 7 Responding to Changes with Events and Exceptions Chapter 8 Putting It both Together with Components Chapter 9 Providing Services Using Interfaces Chapter 10 Using Classes Interchangeably Through Polymorphism C hapter 11 Using Sh atomic number 18d and Static Members Chapter 12 Overloading Operators with ocular C Chapter 13 Saving Instance Data Chapter 14 Reducing Complexity by DesignApp land upix Additional Resources Index Height Gage List of Sidebars OOP with Microsoft ocular Basic . NET and Microsoft Visual C . NET Step by Step PUBLISHED BY Microsoft Press A Division of Microsoft Corporation i Microsoft Way Redmond, working capital 98052-6399 Copyright 2002 by Robin A. Reynolds-Haertle All rights reserved. No power of the contents of this contain may be reproduced or transmitted in each(prenominal) form or by whatever means withtaboo the written permission of the publisher. Library of Congress Cataloging-in-Publication Data Reynolds-Haertle, Robin A. , 1959-OOP with Microsoft Visual Basic . NET and Microsoft Visual C Step by Step / Robin A. Reynolds-Haertle. p. cm. Includes bibliographical references and index. ISBN 0-7356-1568-3 1. Object-oriented programming ( estimator science). 2. Microsoft Visual BASIC. 3. C (Computer program language) I. Title. QA76. 64 . R495 2001 005. 2768dc21 2001052122 Printed and bound in the United States of America. 1 2 3 4 5 6 7 8 9 QWT 7 6 5 4 3 2 Distributed in Canada by Penguin prevails Canada Limited. A CIP catalogue record for this book is available from the British Library.Microsoft Press books are available by booksellers and distributors worldwide. For further study ab bug out international editions, contact your local Microsoft Corporation office or contact Microsoft Press International directly at fax (425) 936-7329. Visit our blade site at www. microsoft. com/mspress. Send comments to email defend com. IntelliSense, Microsoft, Microsoft Press, Visual Basic, Visual C, Visual Studio, and Windows are either registered trademarks or trademarks of Microsoft Corporation in the United States and/or opposite countries.Other product and comp any names mentioned herein may be the trademarks of their respective ow ners. The example companies, organizations, products, domain names, e-mail addresses, logos, people, places, and events depicted herein are fictitious. No connection with any certain company, organization, product, domain name, e-mail address, logo, person, place, or event is intended or should be inferred. Acquisitions Editor Danielle Bird Project Editor Kathleen AtkinsTechnical Editor damn Beaudry Body Part No. X08-42192 MICROSOFT LICENSE AGREEMENT volume Companion CD IMPORTANTREAD CAREFULLYThis Microsoft End- practiser authorise Agreement (EULA) is a healthy agreement between you (either an individual or an entity) and Microsoft Corporation for the Microsoft product identified above, which includes k instantlyledge processing system package and may include associated media, printed materials, and online or electronic documentation (software product crossroad).Any component included within the parcel harvest-time that is accompanied by a founder End- engager License A greement shall be governed by such(prenominal) agreement and non the footing tidy sum forth below. By installing, copying, or former(a)wise victimization the software system PRODUCT, you agree to be bound by the terms of this EULA. If you do not agree to the terms of this EULA, you are not authorized to install, copy, or former(a)wise apply the SOFTWARE PRODUCT you may, however, consequence the SOFTWARE PRODUCT, on with all printed materials and other items that orm a subtract of the Microsoft product that includes the SOFTWARE PRODUCT, to the place you obtained them for a enough refund. parcel PRODUCT LICENSE The SOFTWARE PRODUCT is protected by United States procure police forces and international copyright treaties, as well as other intellectual place laws and treaties. The SOFTWARE PRODUCT is licensed, not sold. 1. appropriate OF LICENSE. This EULA grants you the chase rights a. Software Product. You may install and utilize one copy of the SOFTWARE PRODUCT on a single computer.The primary exerciser of the computer on which the SOFTWARE PRODUCT is installed may make a second copy for his or her exclusive engross on a por panel computer. b. terminus/Ne cardinalrk Use. You may excessively store or install a copy of the SOFTWARE PRODUCT on a storage device, such as a network server, employ only to install or run the SOFTWARE PRODUCT on your other computers over an internal network however, you mustiness acquire and dedicate a license for apiece separate computer on which the SOFTWARE PRODUCT is installed or run from the storage device.A license for the SOFTWARE PRODUCT may not be shared or used concurrently on dissimilar computers. c. License Pak. If you come acquired this EULA in a Microsoft License Pak, you may make the number of additional copies of the computer software portion of the SOFTWARE PRODUCT authorized on the printed copy of this EULA, and you may use each copy in the manner specified above. You are also entitled to make a corresponding number of secondary copies for portable computer use as specified above. . Sample enroll. Solely with respect to portions, if any, of the SOFTWARE PRODUCT that are identified within the SOFTWARE PRODUCT as sample inscribe (the SAMPLE CODE) i. Use and Modification. Microsoft grants you the right to use and modify the source autograph version of the SAMPLE CODE, provided you comply with subsection (d)(iii) below. You may not die the SAMPLE CODE, or any modified version of the SAMPLE CODE, in source rule form. ii. Redistributable Files.Provided you comply with subsection (d)(iii) below, Microsoft grants you a nonexclusive, royalty-free right to reproduce and address the object code version of the SAMPLE CODE and of any modified SAMPLE CODE, other than SAMPLE CODE, or any modified version thereof, designated as not redistributable in the Readme file that forms a part of the SOFTWARE PRODUCT (the Non-Redistributable Sample Code). All SAMPLE CODE other than the Non- Redistributable Sample Code is collectively referred to as the REDISTRIBUTABLES. iii. Redistribution Requirements.If you redistribute the REDISTRIBUTABLES, you agree to (i) distribute the REDISTRIBUTABLES in object code form only in conjunction with and as a part of your software application product (ii) not use Microsofts name, logo, or trademarks to market your software application product (iii) include a valid copyright notice on your software application product (iv) indemnify, hold harmless, and defend Microsoft from and against any claims or lawsuits, including attorneys fees, that arise or result from the use or distribution of your software application product and (v) not permit further distribution of the REDISTR IBUTABLES by your end user. Contact Microsoft for the applicable royalties due and other licensing terms for all other uses and/or distribution of the REDISTRIBUTABLES. 2. DESCRIPTION OF OTHER RIGHTS AND LIMITATIONS. Limitations on Reverse Engineering, Decompilat ion, and Disassembly. You may not reverse engineer, decompile, or disassemble the SOFTWARE PRODUCT, except and only to the extent that such activity is expressly permitted by applicable law notwithstanding this limitation. Separation of Components. The SOFTWARE PRODUCT is licensed as a single product.Its component parts may not be separated for use on more than one computer. Rental. You may not rent, lease, or lend the SOFTWARE PRODUCT. Support Services. Microsoft may, but is not obligated to, provide you with ache services related to the SOFTWARE PRODUCT (Support Services). Use of Support Services is governed by the Microsoft policies and programs described in the user manual, in online documentation, and/or in other Microsoft-provided materials. Any supplemental software code provided to you as part of the Support Services shall be considered part of the SOFTWARE PRODUCT and number to the terms and conditions of this EULA.With respect to technical information you provide to M icrosoft as part of the Support Services, Microsoft may use such information for its business purposes, including for product support and using. Microsoft will not utilize such technical information in a form that personally identifies you. Software Transfer. You may permanently transfer all of your rights under this EULA, provided you retain no copies, you transfer all of the SOFTWARE PRODUCT (including all component parts, the media and printed materials, any upgrades, this EULA, and, if applicable, the Certificate of Au soticity), and the recipient agrees to the terms of this EULA. Termination.Without prejudice to any other rights, Microsoft may terminate this EULA if you fail to comply with the terms and conditions of this EULA. In such event, you must destroy all copies of the SOFTWARE PRODUCT and all of its component parts. 3. COPYRIGHT. All title and copyrights in and to the SOFTWARE PRODUCT (including but not limited to any images, photographs, animations, video, audio, m usic, text, SAMPLE CODE, REDISTRIBUTABLES, and applets incorporated into the SOFTWARE PRODUCT) and any copies of the SOFTWARE PRODUCT are owned by Microsoft or its suppliers. The SOFTWARE PRODUCT is protected by copyright laws and international treaty provisions. Therefore, ou must treat the SOFTWARE PRODUCT like any other copyrighted material except that you may install the SOFTWARE PRODUCT on a single computer provided you keep the original solely for backup or archival purposes. You may not copy the printed materials accompanying the SOFTWARE PRODUCT. 4. U. S. GOVERNMENT RESTRICTED RIGHTS. The SOFTWARE PRODUCT and documentation are provided with RESTRICTED RIGHTS. Use, duplication, or disclosure by the Government is subject to restrictions as stria forth in subparagraph (c)(1)(ii) of the Rights in Technical Data and Computer Software clause at DFARS 252. 27-7013 or subparagraphs (c)(1) and (2) of the Commercial Computer SoftwareRestricted Rights at 48 CFR 52. 227-19, as applicab le. Manu facturer is Microsoft Corporation/One Microsoft Way/Redmond, WA 98052-6399. 5. EXPORT RESTRICTIONS. You agree that you will not export or re-export the SOFTWARE PRODUCT, any part thereof, or any process or service that is the direct product of the SOFTWARE PRODUCT (the foregoing collectively referred to as the Restricted Components), to any country, person, entity, or end user subject to U. S. export restrictions. You specifically agree not to export or re-export any of the Restricted Components (i) to any country to which the U. S. as embargoed or restricted the export of goods or services, which currently include, but are not necessarily limited to, Cuba, Iran, Iraq, Libya, North Korea, Sudan, and Syria, or to any national of any such country, wherever located, who intends to transmit or transport the Restricted Components back to such country (ii) to any end user who you know or mother reason to know will utilize the Restricted Components in the design, development, or production of nuclear, chemical, or biological weapons or (iii) to any end user who has been prohibited from participating in U. S. export transactions by any federal agency of the U. S. government. You warrant and equate that neither the BXA nor any other U. S. ederal agency has suspended, revoked, or denied your export privileges. DISCLAIMER OF WARRANTY NO WARRANTIES OR CONDITIONS. MICROSOFT EXPRESSLY DISCLAIMS all WARRANTY OR CONDITION FOR THE SOFTWARE PRODUCT. THE SOFTWARE PRODUCT AND ANY RELATED DOCUMENTATION are PROVIDED AS IS WITHOUT WARRANTY OR CONDITION OF ANY KIND, EITHE R EXPRESS OR IMPLIED, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A limited PURPOSE, OR NONINFRINGEMENT. THE ENTIRE RISK ARISING OUT OF USE OR PERFORMANCE OF THE SOFTWARE PRODUCT REMAINS WITH YOU. LIMITATION OF LIABILITY.TO THE MAXIMUM EXTENT PERMITTED BY relevant LAW, IN NO EVENT SHALL MICROSOFT OR ITS SUPPLIERS BE LIABLE FOR ANY SPECIAL, INCIDENTAL, INDIRECT , OR CONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF worry PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION, OR ANY OTHER PECUNIARY LOSS) ARISING OUT OF THE USE OF OR INABILITY TO USE THE SOFTWARE PRODUCT OR THE readying OF OR FAILURE TO PROVIDE give SERVICES, EVEN IF MICROSOFT HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. IN ANY CASE, MICROSOFTS ENTIRE LIABILITY UNDER ANY PROVISION OF THIS EULA SHALL BE LIMITED TO THE GREATER OF THE AMOUNT ACTUALLY PAID BY YOU FOR THE SOFTWARE PRODUCT OR US$5. 00 PROVIDED, HOWEVER, IF YOU HAVE ENTERED INTO A MICROSOFT SUPPORT SERVICES AGREEMENT, MICROSOFTS ENTIRE LIABILITY REGARDING SUPPORT SERVICES SHALL BE GOVERNED BY THE TERMS OF THAT AGREEMENT.BECAUSE SOME STATES AND JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY, THE ABOVE LIMITATION MAY NOT APPLY TO YOU. MISCELLANEOUS This EULA is governed by the laws of the State of Washington USA, except and only to the extent t hat applicable law mandates governing law of a different jurisdiction. Should you call for any questions concerning this EULA, or if you desire to contact Microsoft for any reason, please contact the Microsoft subsidiary serving your country, or bring out Microsoft Sales Information Center/One Microsoft Way/Redmond, WA 98052- 6399. PN 097-0002296 For Bruce Youre still the one.About the Author Robin A. Reynolds-Haertle Robins interest in computing began when she taught herself to program in C to fulfill a programming language requirement for her masters degree in biomathematics at the University of Washington. hypnotised by the subject, Robin attended as many computer science sievees as her schedule would permit, and took a position as a programmer with the University of Washington afterward graduation. Robin spent several years in the biotechnology industry, theme entropy applications in various informationbase management systems, C, and Microsoft Visual Basic.Not content to only if read computer science and software technology books, she then pursued and get laidd a masters degree in software engineering at Seattle University. During these years, Robin presented training sessions on software engineering topics to her peers. After so many years in the folkroom, Robin wanted to try teaching, and jumped at the opportunity to teach object- oriented programming with Visual Basic for the University of Washington Outreach program. Here she discovered she loved writing instructional materials and sample projects for her students. This led Robin to her current position as a programmer/writer at Microsoft, writing conceptual documentation for Visual Basic and Microsoft Visual C.When not at the computer, Robin is trying to make peace with her abandoned husband and sons. After she completes this book, they go through forward to Moms attention to Cub Scouts, boy Scouts, hiking, and watching BattleBots. After catching up with the family, Robin hopes to sew a f ew quilts. Acknowledgments First Id like to thank the squad at Microsoft Press that turned my writing into a book. Without Jack Beaudry, the technical editor, I never would harbour gotten any sleep. His meticulous reviews saved me time and saved readers from untold frustration. Kathleen Atkins, the project editor, kept everything running smoothly and improved my text considerably.Credit is also due to Danielle Bird, acquisitons editor Rebecca McKay (Becka), manuscript editor Cheryl Penner and Rebecca Wendling (Becky), copy editors Gina Cassill, compositor and Michael Kloepfer, electronic artist. I also want to thank my colleagues at Microsoft who listened sympathetically to my complaints about deadlines and beta software. Editors Roger Haight and Meredith Waring do me a better writer. Mike Pope reminded me to put the reader earlier of being clever. Megan Shult and Ann Morris, my managers, were supportive even when writing consumed all my after-hours energy. Much of what I learn ed about . NET came from the material written by my team members Jina Chan, Seth Grossman, Steve Hoag, Steve Stein, and Matt Stoecker. And thank you to Diana Rain, my office mate.Id also like to thank Ruth McBride, my longtime manager, and my instructors at Seattle University. I appreciate their patience with my a lot experimental approaches to their assignments over the years. I also have to mention the friends that still call to check on me, even though I havent called them in months. Jennifer Wirt, Lisa Wiken, Molly Potteiger, and Julie Brinkley have been true friends. This book would never have been written without the support of my husband, Bruce. He completely ran my life for the seven months I was writing this book. I worked and wrote he did everything else. My friends are still laughing about how he RSVPs for me.Lastly, I thank my sons for unless being there and for being proud of me. Introduction Microsoft Visual Basic developers have long clamored for complete objectorie nted language support. Microsoft Visual Basic . NET supports all the features of an object- oriented language. In addition, the entire Microsoft . NET Framework, which includes the development support for Microsoft Windows applications, Web applications, Web services, graphics, and entropy access, is designed according to object-oriented principles. Developers who have a firm grasp of object-oriented principles will be the strongest . NET developers.Also new to developers is C, a C-based language that gives developers a language choice for developing with the . NET Framework. Some C, Java, and C++ development will move to C to make believe value of . NETs features. Visual Basic programmers looking to learn a C language might also move to C. Visual Basic . NET and C both support object-oriented development with the . NET Framework. No matter what language you choose for development, being able to read code in either language will double your access to Microsoft Visual Studio docum entation, . NET books, magazine articles, and other developer resources. System RequirementsYoull need the following hardware and software to complete the exercises in this book Microsoft Visual Studio . NET pro edition. The Visual Studio . NET software isnt included with this book. You must leverage it separately and install it before you tin complete the exercises in this book. A computer capable of running Microsoft Visual Studio . NET. The following hardware conformation is recommended by the Microsoft Visual Studio . NET Web site, at http//msdn. microsoft. com/vstudio/ neargen/ Computer/Processor PC with a Pentium II categorise processor, 450 megahertz (MHz) Pentium III syllabus processor, 600 MHz recommendedOperating System Microsoft Windows 2000, Server or Professional Microsoft Windows XP Home or Professional Microsoft Windows NT 4. 0 Server storehouse Windows 2000 Professional, 96 megabytes (MB) of RAM 128 MB recommended Windows 2000 Server, 192 MB of RAM 256 MB recomm ended Windows XP Professional, 128 MB of RAM 160 Recommended Hard Disk 500 MB on System Drive and 3. 0 gigabyte (GB) on installation drive Drive CD-ROM drive Display VGA or higherresolution monitor Computer/Processor Input Device Microsoft purloin or compatible pointing device let oning Your Best Starting Point This book is designed to teach you the fundamentals of object-oriented programming.You sack use this book if you have a basic knowledge of Visual Basic 6, Visual Basic . NET, Visual C, or another Windows programming language. The exercises in this book wear you lot already perform the following lines Create a new Windows Application project, build it, and run it. Add Windows Forms controls to a Windows Form. Create a regularity to respond to the dawn event of a Button control. Create a simple rule (called a Sub or buy the farm in Visual Basic . NET). Declare and use variables. For an design to Visual Basic . NET, read Microsoft Visual Basic . NET Step by Step by Michael Halvorson (Microsoft Press, 2002).For an induction to Visual C , read Microsoft Visual C . NET Step by Step by John Sharp and Jon Jagger (Microsoft Press, 2002). Use the following table to see to it your best commencementing point in this book. If you are New To object- oriented programming Migrating From Visual Basic 6 Switching From another object- oriented programming find out these ill-treats base the approach pattern files as described in the following section, readying and Using the Practice Files Work through the chapters sequentially for a complete introduction to object-oriented programming. Chapters 1 through 7, 9, and 11 concentrate on the mechanics of object- riented programming, while the other chapters cover the concepts in more depth. Install the rehearse files as described in Installing and Using the Practice Files on the next page. Work through the chapters sequentially for a complete introduction to object- oriented programming with Visual Basic .NET. Chapters 1 through 7, 9, and 11 concentrate on the mechanics of object- oriented programming, while the other chapters cover the concepts in more depth. Install the practice files as described in Installingand Using the Practice Files. If you are New language. Referencing The book after working through the exercises Follow these steps Complete Chapter 1 to learn the basic yntax of properties and methods. Read the Quick Reference sections at the end of the chapters for information about specific stratum constructs. Use the index or the Table of Contents to find information about particular subjects. Read the Quick Reference at the end of each chapter to find a brief review of the sentence structure and techniques presented in the chapter. Installing and Using the Practice Files The companion CD inside the back cover of this book contains the practice files that youll use as you perform the exercises in the book. For example, when youre learning to progress to furcate even ts, youll use a bitmap file named Train. bmp.By using the practice files, you wont waste time creating objects that arent relevant to the exercise. Instead, you give the sack concentrate on learning object-oriented programming with Visual Basic . NET and Visual C . NET. The files and the step-by-step instructions in the lessons also let you learn by doing, which is an easy and effective way to acquire and remember new skills. Important Install the practice files Before you break the seal on the OOP with Microsoft Visual Basic . NET and Microsoft Visual C Step by Step companion CD package, be sure that this book matches your version of the software.This book is designed for use with Microsoft Visual Studio . NET Professional Edition for the Windows operating systems. To find out what software youre running, you can check the product package or you can start the software, and then riffle About Microsoft Development Environment in the religious service menu at the top of the screen. Follow these steps to install the practice files on your computers hard disk so that you can use them with the exercises in this book. 1. Remove the companion CD from the package inside the back cover of this book and insert the CD in your CD-ROM drive. 2. Double- blackguard the My Computer icon on the Desktop.Tip On some computers, the startup program might run automatically when you close the CD-ROM drive. In this encase, skip steps 2 through 5 and follow the instructions on the screen. 3. Double- gabble the icon for your CD-ROM drive. 4. Double-click StartCD. exe 5. Click Install Sample Code. The setup program window appears with the recommended options pre take ined for you. For best results in using the practice files with this book, accept these preselected settings. 6. When the files have been installed, remove the CD from your CD- ROM drive and replace it in the package inside the back cover of the book.A tract called OOPVBCS has been created on your hard disk, and the pra ctice files have been placed in that folder. Using the Practice Files Each lesson in this book explains when and how to use any practice files for that lesson. The practice files contain the complete source listings for all the applications created in this book, as well as any resources, such as bitmaps and databases, that youll need to complete the exercises. For those of you who like to know all the details, heres a list of the Visual Basic and Visual C projects on the practice disk Project Chapter 1 Read record books Chapter 2 ReadMoreBooks Chapter 3 CodeAnalysis CodeAnalysis2 Chapter 4DeckOfCards Chapter 5 TheBank ARoundButton Chapter 6 ABetterBank ABetterLibrary Variations Description This simple program demonstrates the basics of creating, instantiating, and using a furcate. This program expands on the ReadBooks program and adds constructors. These two applications demonstrate different approaches to using class properties, and the interaction of class properties and the Data Grid control. This application explores class methods by using dynamic creation of Windows Forms controls and drag-and-drop operations. This simple application demonstrates the basics of class inheritance. This elegant project shows how easy it is to derive rom a Windows Forms control and redefine its drawing. This adaptation of Chapter 5s TheBank application uses an abstract class as a base class. This improvement on Chapter 1s ReadBooks application uses a strongly typed collection. This application contains code snippets demonstrating variations on inheritance. Chapter 7 TrainGame ThrowSystemException PersonList Project Chapter 8 GamesLibrary Memory Chapter 9 MoveIt Points Chapter 10 PatternMaker Chapter 11 BetterCard SortablePoint Singleton Chapter 12 VectorAlgebra Chapter 13 Serialize DataSetExercise Chapter 14 This application introduces delegates, events, and user-drawn controls in the context of a simple game.This small program throws a system exception and recovers by using exception handling. This application creates and throws a custom application exception. Description The GamesLibrary project creates a component library containing objects used to develop the simple Memory card game This application covers the basics of creating and implementing an interface. The Points project contains objects that implement the IComparable, IFormattable, and IEnumerable interfaces. Moving beyond the basics of inheritance, the PatternMaker program makes extensive use of inheritance and polymorphism. This improvement on the Card class from Chapter 4 uses static methods to liminate the projects dependency on file locations. The SortablePoint application from Chapter 10 is made more flexible through static properties. Static field are used to implement the Singleton design pattern. The mathematical concept of vectors is used to demonstrate the exposition and use of operator overloading in Visual C. The Serialize application demonstrates the use of binary and XML ser ialization of data. This very simple ADO. NET application reads data from an Access database. PatternMaker Uninstall the practice files This example uses the PatternMaker exercise from Chapter 10 to demonstrate the way to make design changes after the i nitial development of an application.If you are using the Windows XP Professional operating system, follow these steps to remove the practice files from your computer. If you are using a different version of Windows, refer to your Windows Help documentation for removing programs. 1. Click Start, and then click Control Panel. 2. In Control Panel, click Add Or Remove Programs. 3. In the Add Or Remove Programs window, click OOP Visual Basic And C . NET Code in the Currently Installed Programs list. 4. Click Change/Remove. The Confirm File Deletion duologue appears. 5. Click Yes to delete the practice files. 6. Click Close to close the Add Or Remove Programs window. 7. Close Control Panel.Conventions and Features in this Book This book uses conventions designed to make the information more legible and easier to follow. The book also includes features that contribute to a deeper understanding of the material. Conventions Each exercise is a series of tasks. Each task is presented as a series of numbered steps. If a task has only one step, the step is indicated by a round bullet. Notes labeled tip provide more information for completing a step successfully. Notes labeled important alert you to information you need to check before continuing. The book uses typographic styles to help organize the information presented. The following table describes the styles used. sprint Code Italics Used for Code that you type in Method argument or parameter Event Procedure Field Fully Qualified account Key formulate Method Property value Example Visual Basic Public Class Book End Class // Visual C public class Book aBook show paginate_Click m_shelf SomeBook. textual matter Public, public, If, if Get rascal listOfBooks Roma n Other Features Boolean determine Class name Control type Data type Event Form Namespace debate type Property True, true, False, false Book, Library, Train ListBox, textbookBox attract, string, whole number, int Click Form1 ReadBooks String, string, Integer, int NameShaded sidebars throughout the book provide more in-depth information about the exercise. The sidebars might contain debugging tips, design tips, or topics you might want to explore further. Each chapter ends with a Quick Reference section. The Quick Reference provides a brief review of the syntax and techniques presented in the chapter. Corrections, Comments, and Help Every effort has been made to ensure the accuracy of this book and the contents of the practice files on the companion CD. Microsoft Press provides corrections and additional content for its books through the World Wide Web at http//www. microsoft. com/mspress/support/If you have jobs, comments, or ideas regarding this book or the companion CD, pleas e send them to Microsoft Press. Send e-mail to emailprotected com Or send postal mail to Microsoft Press Attn Step by Step Series Editor One Microsoft Way Redmond, WA 98052-6399 Please note that support for the Visual Studio . NET software product itself is not offered through the preceding address. For help using Visual Studio . NET, visit http//support. microsoft. com. Visit the Microsoft Press World Wide Web Site You are also invited to visit the Microsoft Press World Wide Web site at http//www. microsoft. com/mspress/Youll find descriptions for the complete line of Microsoft Press books, information about ordering titles, notice of special features and events, additional content for Microsoft Press books, and much more. You can also find out the latest in Visual Studio . NET software developments and news from Microsoft Corporation at http//msdn. microsoft. com/vstudio/nextgen/ Check it out Chapter 1 Writing Your First Object-Oriented Program Overview ESTIMATED TIME 2 hr. 30 min . In this chapter, youll learn how to Decide which classes to implement in your program. Create a class with handle, properties, and methods. Use a class in an application. Use Microsoft Visual Studio . NET tools to create a class definition. Classes are the building closes of object-oriented programs. Object-oriented program design is driven by the objects in the problem you need to solve. If your goal is to automate class registration, you might create classes for the instructor, student, and class schedule objects. Objects also have properties that describe them and their sort. These are implemented as properties and methods of a class. Just as an instructor has a name, so does the Instructor class have a Name stead.To assign a student to a class, youd need to find an open section in the schedule. So your ClassSchedule class might implement a FindOpenSection method. The method would likely check the variable, called a field, in the class in which youve stored information a bout sections. In this chapter, youll learn how to identify the objects in your problem domain and their properties and behaviors (methods). Using this psychoanalysis, youll design and implement the classes using property and method programming constructs. Youll then declare and determine the variables of the classes youve coded.Finally, youll implement the solution to your problem by calling the properties and methods of the class variables. Reading Books Your First Object-Oriented Program Your task in this chapter is to implement a program that displays large text files in page- size pieces. Typically, your task begins with a specification, perhaps complete, perhaps not. The specification for Chapter 1 follows You have downloaded on your computer the text of several books. You want to be able to select a book and read one particular page at a time. You also want to be able to set the length of a page. Youve already decided which user interface you want to use its shown hereAs yo u look at the user interface, you can see that you need to add some controls to a Windows form a ListBox, a RichTextBox, two NumericUpDown controls, and some labels. How will you store the texts of the books? How will you fill the list? How will you retrieve the correct page of the book that you want to read? You can use object-oriented programming to answer these questions. Designing the Classe s Before you can implement your classes, you must decide which classes you need. First you look for the objects in the problem. Having found the objects, you then look for properties, which are characteristics or qualities that belong to the object, and methods, which are behaviors of the object.You can choose from many ways to design the classes in an application. The approach presented here begins with a textual analysis of the problem. The nouns are selected as candidates for classes, while verbs become candidates for the methods. In the course of the analysis, youll eliminate many of the nouns as candidates, and you might discover classes that arent among the nouns in the specification. After you detect the objects, properties, and methods that belong to your classes, you can then write the class specification that youll use in the implementation. Find the classes . Read the problem statement, and find all the nouns. You have downloaded on your computer the text of several books. You want to be able to select a book and read one particular page at a time. You also want to be able to set the length of a page. 2. Eliminate candidates. Reasons to eliminate a candidate include The class based on the noun would have only properties or only methods. The class based on the noun wouldnt be relevant to the problem. The class based on the noun wouldnt represent one object.You can eliminate the irrelevant candidates computer and time. Length (of a page) is merely an integer value and wouldnt generate enough behavior to characterise as a class. The same is true of text in this examplethe only thing to be done with it is to display a piece of it, a page. By the same reasoning, page is also not a class. That expires book and books. Books is just the plural of book , so you are left only with book as a potential class. But you arent finished yet. 3. Search for missing candidates. Consider this specification, The dealer deals four cards to each player. Theres no mention of a deck of cards, although deck is a likely class in that problem. Remember eliminating books? Another class does, in fact, represent the properties and behavior of a group of books. You can call this class Library. The library concept is different from the book concept. A book has a title and text and can be read. A library contains many books, which can be checked out and returned. Left with the Book and Library classes, you can now search for properties and methods. Find the methods and properties 1. Read the problem statement, and find all the verbs. You can leave out the helping verbs, such as is, was, and have.As in the case of the nouns, textual analysis of verbs is just the starting point for finding the methods. You have downloaded on your computer the text of several books. You want to be able toselect a book and read one particular page at a time. You also want to be able to set the length of a page. 2. Consider each verb. Is it a method, or does it indicate a method? Is it relevant to the problem? Downloaded and want are clearly irrelevant to the problem. Select is an operation of the Library class. In a real library, this action would correspond to finding a book on the shelf and checking it out. So the Library has a CheckOut method.Theres also a mystical property here because a book needs a title. Read is an operation of the Book class. This method allows you to read one particular page, so it can be named GetPage. The verb set indicates that a property needs to be changed, and that property is the length of a page, PageLength. 3. The same nouns t hat you eliminated as classes might in fact be properties of those classes. Text, length (of a page), and page were eliminated as classes. A book does need text, so Text becomes a property of Book. You discovered that PageLength is a property in considering the verb set.Page represents one section of the text and represents the result of the GetPage operation, so it isnt a property. 4. Look for missing properties and methods. If youre going to check books out of the library, you need a way to add books to the library and return the checked-out books. A CheckIn method will handle this. Testing the Class Design Reread the problem, and determine whether your classes, with their properties and methods, provide the functionality necessity to solve the problem. You have downloaded on your computer the text of several books. Do you have a way of storing and organizing several books?Yes, you can create one Book for each book and one Library to store them all. You want to be able to select a book and read one particular page at a time. Can you select one book and read one page? Yes, books can be selected by their titles, and the GetPage method retrieves one page. You also want to be able to set the length of a page. Can you set the length of a page? Yes, the Book class has a PageLength property. The results are shown in the following table. The methods are shown as they might be declared in Visual Basic. Class Book Properties Integer PageLengt h Methods GetPage (pageNumber As Integer) As String Class Library Creating the Book Class PropertiesString Text String Title Methods CheckIn (aBook As Book) CheckOut(title As String) As Book The following exercise covers the basics of class implementation using the Book class as an example. To implement the Library class, youll use some of the development tools provided by the Microsoft Visual Studio . NET integrated development environment (IDE). Create the book class 1. In the IDE, click the File menu, point to New, and then c lick Project. The New Project dialog box opens. 2. Select Visual Basic Projects or Visual C Projects in the Project Types tree, click Windows Application in the Templates list. 3.Enter ReadBooks in the Name box, and click OK. 4. Display the Solution Explorer by selecting Solution Explorer on the View menu. Click the ReadBooks project in the Solution Explorer. 12. On the Project menu, click Add Class. The Add New Item dialog box appears, as shown here 13. Enter either Book. vb or Book. cs in the Name box, depending on the language you are using. Note that the class name begins with a capital letter and is singular. 14. Click Open. The IDE adds a file to your project. The file includes the basic definition of a class, as shown in the following two screen shots.The Visual Basic class contains the minimum for a class declaration. Heres the syntax for declaring a class in Visual Basic Class ClassName End Class In this case, the class is named Book. The IDE adds the Public modifier thats shown to indicate that the class can be used throughout the project. The Visual C class contains the class declaration as well as a constructor. Heres the syntax for declaring a class in C class ClassName A constructor contains code to initialize the fields of a class and perform other class initialization functions. In C, it has the same name as the class. A constructor isnt required.Ill talk more about constructors in Chapter 2, Creating Class Instances with Constructors. Add the Text and PageLength fields A field is a variable declared in a class block. Fields can be any . NET data type, such as Integer or Boolean . NET class, such as TextBox or ListBox or any class that you have created. 1. Locate the beginning of the class definition. In Visual Basic, the class definition begins immediately after the line that shows the class name. In Visual C, the class definition begins after the opening curly brace of the class. 2. Add the following code inside the class to create Text and PageLength fields. 3. Visual BasicPublic Text As String = Public PageLength As Integer = 10 // Visual C public string Text = p public int PageLength = 10 Tip By convention, the initial letters of names of public members (fields, properties, methods, and events) of a class are capitalized (Textfield) or are intercapitalized (PageLength field). According to the code, you have specified initial values for the fields the empty string for Text and 10 for PageLength. A basic tenet of object-oriented programming is that an object should maintain a consistent state. That means that the state of the object (the values of its fields) should represent a usable state.If you didnt initialize the fields, values would default to for the Text field and 0 for the PageLength field. If those were acceptable values for a book, you could leave them uninitialized. But because compilers and their default values change, you can prevent maintenance problems by initializing the fields. Your client code ( the code that uses a Book object) is able to read and write to any field declared with the public keyword (Public in Visual Basic and public in Visual C). Providing direct access to the class data is a violation of the object-oriented principle of information hiding, which stipulates that the client has no knowledge of the central data structure of an object.In the next section, youll learn how to allow the client code to get and set the Title of the Book without giving away details about the implementation. Add the Title property A property is a programming construct that allows your code to get and set a value. Typically, the code in the property constructor will get and set the value of a semiprivate field in the class. In client code, a public field and a property are used in the same wayfor example, SomeBook. Text and SomeBook. Title. 1. Add the following code to the Book class after the Text and PageLength declarations. 2. Private m_title As String Visual Basic private stri ng m_title // Visual CThis code creates a private field in the Book class. Client code doesnt have access to this property. Tip Private fields of a class are declared using the m_ prefix to identify them as member data. Private field names arent capitalized. 3. Add the following code to the Book class, after the m_title declaration. 4. Visual Basic 5. Public Property Title() As String 6. Get 7. fall out m_title 8. End Get 9. Set(ByVal value As String) 10. m_title = value 11. End SetEnd Property 12. // Visual C 13. public string Title 14. get 15. return m_title 16. 17. set 18. m_title = value 19. These syntax blocks define class properties.The Title property appears in the IntelliSense drop-down list just like any other property, such as the familiar TextBox. Text or Form. Backcolor. The property block allows you to control access to the property. You can add validation code to the Set block to ensure that only reasonable values are assigned to the underlying m_title field. No te Please notice an important difference between fields and properties. A place is reserved in memory for fields. They contain the actual data of the class. Properties provide access to the data but are not data themselves. In this book, I use the word set to mean changing a property. I use the word get to mean retrieving the value of a property.The Get and Set blocks of a property can be called getters and setters, or accessors . The property block is more flexible than youve seen here. Properties can be public or private, read/write, read-only, or write-only. In Visual Basic, the property statements can even take a parameter. By the way, I cover properties in detail inChapter 2, but I need to talk about them at least a minuscule bit in this chapter. A Little Bit About Properties We can use the word properties, in a general object-oriented sense, to mean the descriptive information about an object. We can also use properties to mean the particular syntactic construct provided by V isual Basic and C.The particular meaning of the word can be determined by context. Use properties to validate class data and hide class implementation. You have to make a strong case for using public fields in a class. The addition of a property to a class to control access to the underlying data requires stripped-down effort. The benefit of this practice is that you can easily add validation or change the implementation if you need to without affecting clients already using your objects. Add the GetPage method Add the GetPage method to the class definition after the field declarations. Visual BasicPublic Function GetPage(ByVal pageNumber As Integer) As String Dim start As Integer = (pageNumber -1) * PageLength If (start Text. Length) And (start = 0) Then If (start + PageLength) Text. Length Then Return Text. Substring(start, PageLength) Else Return Text. Substring(start, Text. Length start) End If Else Return End IfEnd Function // Visual C public string GetPage(int pageNumbe r) int start = (pageNumber 1) * PageLength if ((start Text. Length) && (start = 0)) if ((start + PageLength) Text. Length) return Text.Substring(start, PageLength) else return Text. Substring(start, Text. Length start) else return In Chapter 3, Fields and Properties, youll see how we can replace the GetPage method with a construct known as an indexer in Visual C or with a default Item method in Visual Basic. The complete class definitions for our project are shown here Visual Basic Public Class Book Public Text As String = Public PageLength As Integer = 10 Private m_title As String Public Property Title() As String Get Return m_title End Get Set(ByVal Value As String) m_title = Value End Set End PropertyPublic Function GetPage(ByVal pageNumber As Integer) As String Dim start As Integer = (pageNumber 1) * PageLength If (start Text. Length) And (start = 0) Then If (start + PageLength) Text. Length Then Return Text. Substring(start, PageLength) Else Return Text. Subs tring(start, Text. Length start) End If Else Return End If End FunctionEnd Class // Visual Cusing Systemnamespace ReadBooks /// /// Summary description for Book. /// public class Book public string Text = public int PageLength = 10 private string m_title public Book() // // TODO Add constructor logic here // public string Title get return m_title set m_title = value ublic string GetPage(int pageNumber) int start = (pageNumber 1) * PageLength if ((start Text. Length) && (start = 0)) if ((start + PageLength) Text. Length) return Text. Substring(start, PageLength) else return Text. Substring(start, Text. Length start) else return Fields, properties, methods, and constructors can appear in any order in a class definition. Good organization benefits future readers of your code.Heres a common organization and, in fact, the one I used in this book Field declarations Constructors Properties Methods Using the Book Class in an Application Youve just finished i mplementing the Book class. The class definition is just a template for an object. To put data in the fields and properties, you have to create an shell of the class in memory this action is known as instantiation. When you create an interpreter, a section of memory is set aside to hold the fields of the object. If you create another instance of the class, another section of memory is set aside for its fields. You arent going to implement the full solution yet.First you need to write some code to test your class. Youll create two instances of the Book class in the ReadBooks project, and youll display the fourth page of each book. (These will be very pathetic books. ) Youll create a cookbook and a book of fairy tales, so youll need to create two separate instances of the Book class. Instead of creating a fancy interface, youll write just enough code to see whether your class is working as you expected. Test Drivers A short program to test a class is called a driver. Its a good id ea to exercise your class a bit with a driver before adding the class to a larger program.Use the driver to test your class without the interference of other code in the program. Create an instance of Book 1. In the Solution Explorer, double-click Form1 to open it in the Windows form designer. If Form1 is opened in the code editor, select View, Designer. 2. Drag a liberation from the Toolbox onto Form1. If the Toolbox isnt visible, select View, Toolbox. 3. Right -click the button, and click Properties on the shortcut menu. In the Properties window, set the Name property of the button to showPage and set the Text property to Show Page. The button on the Windows form is created from the Button class.Name and Text are properties of the Button class. So we can talk about getting and setting these properties. Form1 is a class as well, and the button you just created is a field of the Form1 class. 4. Double-click the button to create the Click event method. 5. Add the following code in b oldface to the Click event to create a book of fairy tales. 6. Visual Basic 7. Private Sub showPage_Click(ByVal sender As System. Object, _ 8. ByVal e As System. EventArgs) Handles showPage. Click 9. Dim fairyTales As Book 10. fairyTales = New Book() 11. End Sub 12. // Visual C 13. rivate void showPage_Click(object sender, System. EventArgs e) 14. Book fairyTales 15. fairyTales = new Book() 16. Add the following code to set the Text, PageLength, and Title properties immediately after the code you entered in step 5 17. Visual Basic 18. fairyTales. Text = Once upon a time there was a bear. 19. fairyTales. PageLength = 8fairyTales. Title = Fairy Tales 20. // Visual C 21. fairyTales. Text = Once upon a time there was a bear. 22. fairyTales. PageLength = 8 fairyTales. Title = Fairy TalesWhen the instance of Book is created, its fields contain the values specified in the class definition. The Text field is an empty string, the page length is 10, and the title is blank. Notice that i t makes no difference in the client code whether you use a field or a property. 23. Add the following code after the fairyTales code to create another instance of the Book class. (This instance will be a recipe book. ) 24. Visual Basic 25. Dim cookies As Book = New Book() 26. cookies. Text = Chocolate chip cookies are the closely palatable co okies. 27. ookies. PageLength = 8 28. cookies. Title = Cookie Recipes 29. // Visual C 30. Book cookies = new Book() 31. cookies. Text = Chocolate chip cookies are the most delicious co okies. 32. cookies. PageLength = 8 cookies. Title = Cookie Recipes In this case, you used a different syntax for declaring and initializing a variable of the Book class. Visual Basic and Visual C allow declaration and initialization in the same statement. Declaring and initializing in the same statement has the following advantages Programmers are less likely to forget to initialize the variable. When a class defines a constructor with parameters, the field s can be initialized at the same time. (Youll create constructors with parameters in Chapter 3. ) Use an instance of the Book class 1. Add the following code after the cookies code to display some of the text of the two books. In later chapters, youll learn other ways to return the text of a particular page in the book. 2. Visual Basic 3. Dim page As Integer = 3 4. Dim report As String 5. report = Page & page. ToString() & ControlChars. CrLf _ 6. & fairyTales. Title & & fairyTales. GetPage(page) _ 7. ControlChars. CrLf _ 8. & Cookies & cookies. GetPage(page) 9. MessageBox. Show(report) 10. report = Titles + fairyTales. Title & and & cookies. Title 11. MessageBox. Show(report) 12. // Visual C 13. int page = 3 14. string report 15. report = Page + page. ToString() + 16. + fairyTales. Title + + fairyTales. GetPage(page) + 17. + cookies. Title + + cookies. GetPage(page) 18. MessageBox. Show(report) 19. report = Titles + fairyTales. Title + and + cookies. Title Messag eBox. Show(report)This bit of code demonstrates that there are two separate instances of the Book class. We can refer to these instances using the variables fairyTales and cookies . The object-oriented concept that permits each instance to be referred to separately is known as identity. Youll see in later chapters that the identity principle doesnt mean that you have to create a variable for each instance. Creating so many variables is unwieldy if you need hundreds of instances of a class. Identity does mean that you can refer to each instance separately when you need to.Notice that when you created an instance of Book, the fields of fairyTales were changed and the GetPage method was called. Later on we retrieved the value of the Title property. The value of Title was unchanged after the GetPage method was called. The fact that the value was unchanged demonstrates the concept of object state, the idea that the fields retain their values between method calls. Compare the way the GetP age method works with a method that has variable declarations. After the GetPage method ends, the variables go out of scope and their values are lost to the application. 20. Press F5 to run the code. Click the Show Page button.The results are shown here Click OK, and the book titles are displayed in a message box as shown here Click OK, and then close the application. Youve now created a class, Book, and two instances of it. Your code sent a message to the Book class through the GetPage method to ask for the third page of the text. In the next sections, youll implement another class, Library. This time, however, youll let some of the IDE tools do some of the syntactic work for you. Using the Class View The IDE provides a Class View that displays a tree view of the class structure of the project, namespaces, and classes.The Class View can share the same window as the Solution Explorer. On the View menu, click Class View to open the Class View. The expanded Class View is shown below f or Visual Basic and Visual C, respectively. The highest- direct node represents the project, ReadBooks. The next level of nodes represents the namespaces in the project. A project can contain several namespaces in this case, theres only one. The project namespace contains two classes the class that we created, Book, and the class for the Windows form, Form1. The Book class contains two public fields, PageLength and Text, epresented by blue blocks, and one private field, m_ti

Saturday, May 25, 2019

The Twilight Saga 5: Midnight Sun 12. Complications

Complications, Jacob read. I dont manakinred the sound of that.Im certain its non as bad as it sounds, Bella shrugged.Bella and I walked silently to biology. I was sifting to focus myself on the moment, on the girl be nerve me, on what was actu all in ally and solid, on anything that would keep Alices deceitful, stringentingless visions unwrap of my head.Its non meaningless, Jacob muttered, dont underestimate it.We passed Angela Weber, lingering on the sidewalk, discussing an assignment with a son from her Trigonometry class. I scanned her judgments perfunctorily, expecting more disappointment, single to be surprised by their wistful tenor.Ah, so at that place was something Angela extremityed. Unfortunately, it wasnt something that could be well pay-wrapped.She must bid the guy, Bella tell.This should be interesting, Jacob chuckled.It will notwithstanding work if the guy akins her dorsum though, Bella said.But Angela is cool who wouldnt like her, Jacob said.I entangle strangely comforted for a moment, hearing Angelas black yearning. A genius of kinship that Angela would never live on well-nigh passed through me, and I was, in that second, at peerless with the variety show human girl.What does he mean by that your yearning isnt hopeless, Edward Bella huffed.It was inquisitively consoling to know that I wasnt the only unrivaled living out a tragic love story. Heartbreak was e actuallywhere.Argh, Bella groaned. solitary(prenominal) if you keep estimateing that way.In the next second, I was abruptly and thoroughly irritated. Because Angelas story didnt fork over to be tragic. She was human and he was human and the difference that look atmed so insurmount open in her head was ridiculous, truly ridiculous comp atomic number 18d to my take in situation. There was no point in her broken heart. What a wasteful sadness, when there was no valid reason for her not to be with the hotshot she wanted.Yeah, wasteful, Bella muttered, think ing that Edwards was wasteful too, though he did overhear more of a reason to be so cautious. wherefore shouldnt she have what she wanted? Why shouldnt this one story have a happy ending?I wanted to pose her a gift Well, I would defecate her what she wanted. Knowing what I did of human nature, it probably wouldnt even be real difficult. I sifted through the consciousness of the boy beside her, the object of her affections, and he did not seem unwilling, he was erect stymied by the uniform difficulty she was. Hopeless and resigned, the way she was.Come on, people, have faith in yourselves, Jacob said.Bella, however, was thoughtful. She wondered if this was a mirror of how she and Edward felt both of them not fully realizing what they other felt. She was accepted that her book self couldnt have known how often he loved her there was no possible way for her to know that. And she could see clearly that Edward didnt understand how much she lo er however she felt somewhat(predi cate) him.She discontinueped that train of thought as something else seemed to go through her. She was wondering how strongly did she feel about this guy that she had yet to meet and she longed for that meeting to break already. Jacob started reading and then, drawing her concentration back to the book.All I would have to do was plant the suggestionThe plan formed intimately, the script wrote itself without effort on my part. I would need Emmetts help relieve oneselfting him to go along with this was the only real difficulty.Human nature was so much easier to manipulate than vampire nature.Youve got to watch out for this guy, Bells, hes definitely a speciesist, Jacob said.Whatever, Bella rolled her eyeball.I was joyful with my solution, with my gift for Angela. It was a nice diversion from my own problems. Would that mine were as easily fixed.My mood was slightly improved as Bella and I took our seats. maybe I should be more positive. Maybe there was some solution out there f or us that was escaping me, the way Angelas obvious solution was so invisible to her. non likely But why waste time with hopelessness? I didnt have time to waste when it came to Bella. Each second mattered.Mr. Banner entered pulling an quaint TV and VCR. He was skipping through a section he wasnt particularly interested ingenetic disordersby showing a movie for the next three days. Lorenzos Oil was not a very cheerful piece, alone that didnt stop the excitement in the room. No maintains, no test-able material. Three free days. The humans exulted.It sounds kind of boring to me, Bella mumbled and Jacob looked at her oddly.It didnt matter to me, either way. I hadnt been planning on paying any precaution to anything full(a)ly Bella.I did not pull my chair away from hers nowadays, to give myself space to breathe.Instead, I sat close beside her like any normal human would. Closer than we sat inside my car, close enough that the left side of my body felt submerged in the heat from her uncase.I get it Shes hot Jacob said and laughed when Bella blushed and gl ard at him.It was a strange experience, both enjoyable and nerve-racking, but I preferred this to sitting across the table from her. It was more than I was used to, and yet I quickly realized that it was not enough. I was not satisfied. Being this close to her only made me want to be closer still. The pull was stronger the closer I got.I had accused her of existence a attractor for danger. Right now, it felt like that was the literal truth.Bella rolled her eyeball but chuckled at this.I was danger, and, with every inch I allowed myself snuggleer to her, her attraction grew in force.And then Mr. Banner saturnine the lights out.It was odd how much of a difference this made, considering that the lack of light meant little to my eyes. I could still see just as perfectly as before. Every detail of the room was clear.Thats cool, Jacob said. I coveting I could see in the dark like that.So why the choppy s hock of electricity in the air, in this dark that was not dark to me?Shock of electricity? Bella raised an eyebrow. What was he talking about and why did that sack her think of the offshoot time he touched her in the second chapter (the first time he talked to her in the books)?Was it because I knew that I was the only one who could see clearly? That both Bella and I were invisible to the others? Like we were alone, just the two of us, vague in the dark room, sitting so close beside one anotherMy hand moved toward her without my permission. Just to touch her hand, to hold it in the nighttime. Would that be such a horrific mistake? If my skin bothered her, she only had to pull awayI yanked my hand back, folded my arms tightly across my chest and clenched my manpower closed. No mistakes. Id promised myself that I would make no mistakes, no matter how minimal they seemed. If I held her hand, I would only want moreanother insignificant touch, another move closer to her. I could fee l that. A new kind of desire was growing in me, working to all override my self- apply.Jacob and Bella were thinking the comp allowe opposite thing here.No mistakes.Bella folded her arms securely across her own chest, and her hands balled up into fists, just like mine.You feeling this too, arent you? Jacob questioned, and I know it didnt happenYeah, I think I am feeling this, Bella exercise before he could recite any more. I wonder what it means.It seems like youre calling to each other somehow, Jacob said, and then he human activity his sassing. It seemed like some kind of rep allowe(predicate)ual answer that went way beyond human whatever that means.What are you thinking? I was dying to whisper the words to her, but the room was too quiet to get away with even a verbalize conversation.The movie began, lightening the darkness just a number. Bella glanced up at me. She noted the rigid way I held my bodyjust like hersand make a faced. Her lips parted slightly, and her eyes seemed full of warm invitations.Or perhaps I was seeing what I wanted to see.I smiled back her breathing caught with a low gasp and she looked quickly away.That made it worse. I didnt know her thoughts, but I was on the spur of the moment positive that I had been right before, and that she wanted me to touch her. She felt this dangerous desire just as I did.Between her body and mine, the electricity hummed.Bella blushed, still not sure what this all meant, but had a salutary idea. She was also wondering what would happen if he did touch her.She didnt move all through the hour, holding her stiff, controlled pose as I held mine. Occasionally she would peek at me again, and the humming current would jolt through me with a sudden shock.Um stop look at him, Jacob said.I doubt I can help it, Bella said. Besides, hes looking at me nonstop I should be allowed to look too.The hour passedslowly, and yet not slowly enough. This was so new, I could have sat like this with her for days, just to experience the feeling fully.So the electricity was pleasant, Jacob said.Apparently, Bella said evenly, but she was still blushing.I had a dozen dissimilar arguments with myself while the minutes passed, rationality try with desire as I seek to justify poignant her.Finally, Mr. Banner turned the lights on again.In the bright fluorescent light, the atmosphere of the room returned to normal.Bella sighed and stretched, flexing her fingers in front of her. It must have been uncomfortable for her to hold that position for so long. It was easier for mestillness came naturally.So now youre nerve-wracking to mimic the vampires, Jacob said shaking his head, trying to laugh.Well, they are the coolest thing around, Bella smiled when he made a face at that.I chuckled at the relieved expression on her face. Well, that was interesting.Umm, she murmured, clearly understanding what I referred to, but making no comment. What I wouldnt give to hear what she was thinking right now.I would like to know that too, Bella said.I wouldnt have guessed that by your smug expression, Jacob chuckled.I sighed. No amount of wishing was termination to help with that.Both Bella and Jacob were chuckling at that.Shall we? I asked, standing.She made a face and got unsteadily to her feet, her hands splayed out as if she were afraid she was going to fall.I could offer her my hand. Or I could place that hand underneath her elbowjust lightlyand slopped her. originally that wouldnt be such a august infractionNo mistakes.How would that be a mistake? Bella questioned.Even with hearing his thoughts, I cant unfeignedly understand most of his thinking, Jacob shrugged. Though its clear that hes afraid of touching you.She was very quiet as we walked toward the gym. The crease was in evidence between her eyes, a sign that she was deep in thought. I, too, was thinking deeply.One touch of her skin wouldnt hurt her, my selfish side contended.I could easily moderate the pressure of my hand. It wasnt exactly difficult, as long as I was firmly in control of myself. My tactile sense was better developed than a humans I could juggle a dozen crystal goblets without breaking any of them I could stroke a soap bubble without popping it. As long as I was firmly in controlAnd youre always in control, so it will be fine, Bella said.Hes not always in control weve seen him out of control, Jacob said anxiously.Bella just frowned at that and Jacob read on.Bella was like a soap bubblefragile and ephemeral. Temporary.How long would I be able to justify my presence in her life? How much time did I have? Would I have another chance like this chance, like this moment, like this second?She would not always be within my arms reachBella turned to face me at the gyms admission, and her eyes widened at the expression on my face. She didnt sing. I looked at myself in the reflection of her eyes and saw the conflict raging in my own. I watched my face change as my better side scattered the argument.Who s to say what the better said is, Edward? Bella mumbled to herself but Jacob heard.My hand lifted without a conscious command for it to do so. As gently as if she were made of the thinnest glass, as if she were fragile as a bubble, my fingers stroked the warm skin that covered her cheekbone. It heated under my touch, and I could feel the pulse of blood speed beneath her plain skin.Enough, I ordered, though my hand was aching to act upon itself to the side of her face. Enough.He doesnt sound too controlled now, Jacob muttered.Hes touch is gentle its not hurting me, Bella said.But his attend doesnt seem to have control over his actions, Jacob countered. His instincts do.And what instinct is he following now? Bella raised her eyebrows. Its not to hurt me.Right, Jacob mumbled, but there still is an instinct in him that wants to hurt you dont forget that.I wont, Bella sighed. But that isnt the only instinct he has towards me now.It was difficult to pull my hand back, to stop myself fr om moving closer to her than I already was. A thousand different possibilities ran through my mind in an instanta thousand different ways to touch her. The tip of my finger tracing the shape of her lips. My palm cupping under her chin. Pulling the clip from her hair and letting it spill out across my hand. My arms winding around her waist, holding her against the continuance of my body.Enough.I forced myself to turn, to move away from her. My body moved stiffly unwilling.I let my mind linger behind to watch her as I walked swiftly away, almost running from the temptation. I caught Mike Newtons thoughtsthey were the sportyestwhile he watched Bella walk past him in oblivion, her eyes unfocused and her cheeks red. He glowered and suddenly my name was mingled with curses in his head I couldnt help grinning slightly in response.Too bad Mikey, Jacob said, trying to chuckle again.My hand was tingling. I flexed it and then curled it into a fist, but it continued to sting painlessly.No, I hadnt hurt herbut touching her had still been a mistake.It felt like firelike the thirsting burn of my throat had spread throughout my entire body.The next time I was close to her, would I be able to stop myself from touching her again? And if I touched her once, would I be able to stop at that?Yes, Bella answered, there was no doubt in her, though Jacob wasnt totally convinced.No more mistakes. That was it. Savor the memory, Edward, I told myself grimly, and keep your hands to yourself. That, or I would have to force myself to leavesomehow. Because I couldnt allow myself near her if I insisted on making errors.I took a deep breath and tried to steady my thoughts.Emmett caught up to me outside the English building.Hey, Edward. Hes looking better. Weird, but better. Happy.Ah and him being happy is weird, Jacob chuckled.Hey, Em. Did I look happy? I supposed, despite the chaos in my head, I felt that way.Way to keep your mouth shut, kid. Rosalie wants to rip your tongue out.I like to see her try and then get beaten down, Jacob chuckled.Thats not very nice, Bella glared at him and he shrugged.I sighed. Sorry I left you to cut with that. Are you angry with me?Naw. Rosell get over it. It was bound to happen anyway. With what Alice sees comingDont reference work that, Jacob flinched.Alices visions were not what I wanted to think about right now. I stared forward, my teeth locking together.As I searched for a distraction, I caught sight of Ben Cheney entrance the Spanish room ahead of us. Ahhere was my chance to give Angela Weber her gift.Ben Cheney, Bella mumbled and got out her year book to look at him. He was cute enough, though not her type at all. Still she studied the video recording, if Angela and Ben liked each other she wanted them to be together in this reality, too. She thought that things might be different now that she knew what Edward was thinking about her, so she might have to be the one to help Ben and Angela out argh that wasnt unfeignedly her strong point. Oh well, it will have to happen someway.I stopped walking and caught Emmetts arm. Hold on a second.Whats up?I know I dont deserve it, but would you do me a opt anyway?What is it? he asked, curious.Under my breathand at a speed that would have made the words incomprehensible to a human no matter how loud theyd been spokenI explained to him what I wanted.He stared at me blankly when I was done, his thoughts as blank as his face.That sound interesting, Jacob chuckled.So? I prompted. Will you help me do it?It took him a minute to respond. But, why?Cmon, Emmett. Why not?Who are you and what have you done with my brother?Bella and Jacob both chuckled at this.Arent you the one who complains that school is always the same? This is something a little different, isnt it? Consider it an experimentan experiment in human nature.He stared at me for another moment before he caved. Well, it is different, Ill give you that Okay, fine. Emmett snorted and then shrugged. Ill help you.I g rinned at him, feeling more enthusiastic about my plan now that he was on board. Rosalie was a pain, but I would always owe her one for choosing Emmett no one had a better brother than mine.Aw, Jacob said in teasing component part but Bella smiled at what Edward had just said.Emmett didnt need to practice. I whispered his lines to him once under my breath as we walked into the classroom.Ben was already in his seat behind mine, assembling his homework to hand in.Emmett and I both sat and did the same thing. The classroom was not quiet yet the murmur of subdued conversation would continue until Mrs. Goff called for attention.She was in no hurry, appraising the quizzes from the last class.So, Emmett said, his voice louder than necessaryif he were really speaking only to me. Did you ask Angela Weber out yet?Oh I get it, Jacob said laughing. This should work.The sound of papers rustling behind me came to an abrupt stop as Ben froze, his attention suddenly riveted on our conversation.Ang ela? Theyre talking about Angela?Hm it definitely makes it easy that Edward knows what hes thinking, Bella muttered.Good. I had his interest.No, I said, shaking my head slowly to come in regretful.Why not? Emmett improvised. Are you chicken?I grimaced at him. No. I heard that she was interested in someone else.Edward Cullen was going to ask Angela out? But No. I dont like that. I dont want him near her. Hesnot right for her. Notsafe.You got that right, Jacob chuckled and Bella glared at him. What? You want him to go out with Angela?Dont be ridiculous, Bella rolled her eyes and Jacob laughed louder.I hadnt anticipated the chivalry, the protective instinct. Id been working for jealousy. But whatever worked.Youre going to let that stop you? Emmett asked scornfully, improvising again.Jacob laughed even more at that.Not up for the contention?I glared at him, but made use of what he gave me. Look, I guess she really likes this Ben person. Im not going to try to convince her otherwise. Th ere are other girls.The reaction in the chair behind me was electric.Who? Emmett asked, back to the script.My lab partner said it was some kid named Cheney. Im not sure I know who he is.Thats rude the guys right behind you, Jacob muttered.Um Jake, thats the point, Bella said.I know, Jacob rolled his eyes. Im just saying it makes him sound like a stuck upWhatever, Bella rolled her eyes.I bit back my smile. Only the haughty Cullens could get away with pretending not to know every student at this tiny school.Bens head was whirling with shock. Me? all over Edward Cullen? But why would she like me?Edward, Emmett muttered in a lower tone, rolling his eyes toward the boy.Hes right behind you, he mouthed, so obviously that the human could easily read the words.Oh, I muttered back.Jacob and Bella were laughing at this again.I turned in my seat and glanced once at the boy behind me. For a second, the black eyes behind the glasses were frightened, but then he stiffened and squared his narrow shoulders, affronted by my clearly disparaging evaluation. His chin shot out and an angry iron boot darkened his golden-brown skin.Huh, I said arrogantly as I turned back to Emmett.He thinks hes better than me. But Angela doesnt. Ill show himWell, theres that problem solved, Jacob chuckled.Perfect.Didnt you say she was winning Yorkie to the dance, though? Emmett asked, snorting as he said the name of the boy that some(prenominal) scorned for his awkwardness.That was a group decision apparently. I wanted to be sure that Ben was clear on this. Angelas shy. If Bwell, if a guy doesnt have the nerve to ask her out, shed never ask him.You like shy girls, Emmett said, back to improvisation. Quiet girls. Girls likehmm, I dont know. Maybe Bella Swan?Jacob laughed at this line of teasing as Bella blushed.I grinned at him. Exactly. Then I returned to the performance. Maybe Angela will get tired of postponement. Maybe Ill ask her to the prom.No, you wont, Ben thought, straightening up in hi s chair. So what if shes so much taller than me?Oh its because hes short poor guy, Jacob chuckled.I suppose thats not a problem you have to deal with, Bella said, Jacob seemed pretty tall for his age.Not at all, Jacob said. I think I might even have grown an inch since yesterday.Sure you did, Jake, Bella rolled her eyes.If she doesnt care, then neither do I. Shes the nicest, smartest, prettiest girl in this school and she wants me.I liked this Ben. He seemed bright and well-meaning. Maybe even worthy of a girl like Angela.Well, it looks like therere three humans that he might think highly of, Jacob chuckled.I gave Emmett a thumbs up under the desk as Mrs. Goff stood and greeted the class.Okay, Ill admit itthat was sort of fun, Emmett thought.I smiled to myself, pleased that Id been able to shape one love storys happy ending. I was positive that Ben would follow through, and Angela would receive my anonymous gift. My debt was repaid.How silly humans were, to let a six inch height dif ferential confound their happiness.That is a pretty big difference, Jacob said. That guy must be a midget.Jake Bella reprimanded him.Sorry, Jacob sighed.My success put me in a good mood. I smiled again as I settled into my chair and prepared to be entertained. After all, as Bella had pointed out at lunch, Id never seen her in action in her gym class before.No, Bella groaned and Jacob laughed in anticipation.Mikes thoughts were the easiest to pinpoint in the babble of voices that swarmed through the gym. His mind had gotten far too familiar over the last few weeks. With a sigh, I resigned myself to listening through him. At least I could be sure that he would be paying attention to Bella.I was just in time to hear him offer to be her badminton partner as he made the suggestion, other partnerings ran through his mind. My smile faded, my teeth clenched together, and I had to remind myself that murdering Mike Newton was not a permissible option.Hm Im not so sure about that, Jacob laughe d.Its not, Bella said firmly.Thanks, Mikeyou dont have to do this, you know.Dont baffle, Ill keep out of your way.They grinned at each other, and flashes of numerous accidentsalways in some way connected to Bellaflashed through Mikes head.Jacob started chuckling and Bella groaned. Mike played alone at first, while Bella hesitated on the back half of the court, holding her racket gingerly, as if it was some kind of weapon. Then Coach Clapp ambled by and ordered Mike to let Bella play.Why? Bella moaned, didnt the coach-and-four understand yet?Uh oh, Mike thought as Bella moved forward with a sigh, holding her racquet at an awkward angle.Jennifer crossway served the birdie directly toward Bella with a smug twist to her thoughts. Mike saw Bella lurch toward it, swinging the racket yards wide of her target, and he rushed in to try to save the volley.I watched the trajectory of Bellas racquet with alarm. Sure enough, it hit the taut net and sprung back at her, clipping her forehead bef ore it spun out to contain Mikes arm with a resounding thwack.Jacob was howling with laughed and Bella turned bright red and held her head in her hands. That was a new all time low for her.You really are awful, Jacob choked out some time later.Yeah, yeah, now can you continue reading, Bella tried to sound as if this wasnt bothering her, but she was still red and her voice was too weak to pull that off.Ow. Ow. Ungh. Thats going to leave a bruise.Good, Jacob said, his dying laughter starting again.Bella was kneading her forehead. It was hard to stay in my seat where I belonged, knowing she was hurt. But what could I do, if I were there? And it didnt seem to be serious I hesitated, watching. If she intended to continue to try to play, I was going to have to fabrication an excuse to pull her out of class.Overreaction, Bella rolled her eyes.The coach laughed. Sorry, Newton. That girls the worst jinx Ive ever seen. Shouldnt inflict her on the othersMore laughter for Jacob, but Bella wa s pleased that the coach seemed to get it better now.He turned his back deliberately and moved to watch another pole so that Bella could return to her former spectators role.Ow, Mike thought again, massaging his arm. He turned to Bella. Are you okay?Yeah, are you? she asked sheepishly, blushing.I think Ill make it. Dont want to sound like a crybaby. But, man, that hurtsCrybaby, Jacob laughed.Mike swung his arm in a circle, wincing.Ill just stay back here, Bella said, embarrassment and chagrin on her face rather than pain. Maybe Mike had got the worst of it. I certainly hoped that was the case.At least she wasnt playing anymore. She held her racquet so carefully behind her back, her eyes wide with remorse I had to disguise my laugh as coughing.Whats funny? Emmett wanted to know.You know if you were in Emmetts Gym class, I bet he would have liked you from the first day, Jacob teased.Shut up, Bella hissed at him.Tell you later, I muttered.Bella didnt venture into the game again. The c oach ignored her and let Mike play alone.I breezed through the quiz at the end of the hour, and Mrs. Goff let me go early. I was listening intently to Mike as I walked across the campus. Hed decided to confront Bella about me.Jessica swears theyre dating. Why? Why did he have to pick her?He didnt recognize the real phenomenonthat shed picked me.Dont go overboard with that, Bella rolled her eyes, it was more of a phenomenon that he had picked her after a hundred years after all.So.So what? she wondered.You and Cullen, huh? You and the freak. I guess, if a robust guy is that important to youBella was glaring at the book, she didnt like this assumption at all, but what was really getting to her was how very wrong Mike was Edward was so much more than just a rich guy.I gritted my teeth at his degrading assumption.Thats none of your business, Mike.Defensive. So its true. Crap. I dont like it.You dont have to, she snapped.Why cant she see what a circus sideshow he is? Like they all are.B ella was glaring more at the book than before, not liking his way of thinking at all.The way he stares at her. It gives me chills to watch. He looks at you likelike youre something to eat.Bella and Jacob both tensed a little at that it wasnt good that Mike was able to notice that.I cringed, waiting for her response.Her face turned bright red, and her lips pressed together like she was holding her breath. Then, suddenly, a giggle burst through her lips.You laughed? Jacob looked at her incredulously.Um the irony of that must have gotten to me, Bella said. Im sure it was a nervous laugh if that makes you feel any better.It doesnt, Jacob said and then started reading again.Now shes laughing at me. Great.Mike turned, thoughts sullen, and wandered off to change.I leaned against the gym wall and tried to compose myself.How could she have laughed at Mikes accusationso entirely on target that I began to worry that Forks was becoming too aware Why would she laugh at the suggestion that I coul d kill her, when she knew that it was entirely true? Where was the humor in that?What was wrong with her?Nothings wrong with me, Bella huffed.I beg to differ, Jacob chuckled, though he was giving her an odd look, too.Did she have morbid sense of humor? That didnt fit with my idea of her character, but how could I be sure? Or maybe my daydream of the giddy angel was true in the one respect, in that she had no sense of fear at all. Bravethat was one word for it.Im not brave, Bella mumbled.Others might say stupid,So I guess youre stupid then, Jacob chuckled and Bella glared at him.but I knew how bright she was. No matter what the reason, though, this lack of fear or twisted sense of humor wasnt good for her. Was it this strange lack that put her in danger so constantly? Maybe she would always need me hereJust like that, my mood was soaring.If I could just discipline myself, make myself safe, then perhaps it would be right for me to stay with her.When she walked through the gym doors, her shoulders were stiff and her lower lip was between her teeth againa sign of anxiety. But as soon as her eyes met mine, her rigid shoulders relaxed and a wide smile spread across her face. It was an oddly peaceful expression. She walked right to my side without hesitation, only stopping when she was so close that her body heat crashed over me like a tidal wave.Hi, she whispered.The happiness I felt in this moment was, again, without precedent.Hello, I said, and thenbecause with my mood suddenly so light I couldnt resist teasing herI added, How was gym?Argh did he have to make that? Bella groaned.Yep, Jacob chuckled. Besides, isnt it better that you know hes watching you not as creepy that way at least.Whatever, Bella shrugged.Her smile wavered. Fine.She was a poor liar.True, Jacob and Bella both said.Really? I asked, about to press the issueI was still concerned about her head was she in painbut then Mike Newtons thoughts we so loud they broke my concentration.I hate him. I wish he would die. I hope he drives that shiny car right off a cliff. Why couldnt he just leave her alone? pivot to his own kindto the freaks.What does he mean, his own kind? Jacob asked. He doesnt know that Edward is a vampire.I suppose he means rich? Bella said slowly, not sure of the answer herself. That or he instinctively knows that Edward is different.What? Bella demanded.My eyes refocused on her face. She looked at Mikes retreating back, and then at me again.Newtons getting on my nerves, I admitted.Her mouth fell open, and her smile disappeared. She must have forgotten that Id had the power to watch through her calamitous last hour, or hoped that I hadnt utilized it.More likely the latter, Bella said, after all he had demonstrated that gift quite well during their last few encounters.You werent listening again?Hows your head?Youre unbelievable she said through her teeth, and then she turned away from me and stalked furiously toward the parking lot. Her skin flushed dark redshe w as embarrassed.You got that right, Jacob said.Well, no one asked him to watch me in Gym, Bella grumbled, her clumsiness was always a crank spot for her.I kept pace with her, hoping that her anger would pass soon. She was usually quick to forgive me.You were the one who mentioned how Id never seen you in Gym, I explained. It made me curious.She didnt answer her eyebrows pulled together.She came to a sudden halt in the parking lot when she realized that the way to my car was blocked by a crowd of male students.I wonder how fast theyve gone in this thingLook at the SMG shift paddles. Ive never seen those outside of a magazineNice side grillsSure wish I had sixty thousand dollars laying aroundUm Jacob do you want me to leave, Bella chuckled as Jacob was practically drooling at the description of the car.No, but I want you to get me into the Cullen garage sometime in the future, Jacob said.You do realize thats Rosalies car Bella said smirking.Argh, Jacob groaned. Why did you have to rem ind me of that?This was exactly why it was better for Rosalie to only use her car out of town.I wound through the throng of lustful boys to my car after a second of hesitation, Bella followed suit.Ostentatious, I muttered as she climbed in.What kind of car is that? she wondered.An M3.She frowned. I dont speak Car and Driver.Come on, Bella Jacob groaned. You should know that at least.Sorry, Bella shrugged, chuckling at his behavior.Its a BMW. I rolled my eyes and then focused on backing out without running anyone down. I had to lock eyes with a few boys that didnt seem willing to move out of my way. A half-second meeting my compliments seemed to be enough to convince them.Is that car really that special? Bella rolled her eyes.Jacob just stared at her incredulously.I guess it is, Bella mumbled.Are you still angry? I asked her. Her frown had relaxed.Definitely, she answered curtly.I sighed. Maybe I shouldnt have brought it up. Oh well. I could try to make amends, I supposed. Will you forgive me if I apologize?She thought about that for a moment. Maybeif you mean it, she decided.And if you promise not to do it again.Dont hold your breath, Jacob chuckled.I know thats never going to happen, Bella chuckled too.I wasnt going to lie to her, and there was no way I was agreeing to that. Perhaps if I offered her a different exchange.How about if I mean it, and I agree to let you drive this Saturday? I cringed internally at the thought.Oh that works, Bella said.The furrow popped into existence between her eyes as she considered the new bargain. Deal, she said after a moment of thought.Now for my apology Id never tried to dazzle Bella on purpose before, but now seemed like a good time.Oh great, Bella mumbled, blushing already. The thought of him actually trying to dazzle her was too much for her.I stared deep into her eyes as I drove away from the school, wondering if I was doing it right. I used my most persuasive tone.Then Im very sorry I upset you.Her heartbeat thudded louder than before, and the rhythm was abruptly staccato.Her eyes widened, looking a little stunned.I half-smiled. It seemed like Id gotten it right. Of course, I was having a bit of difficulty looking away from her eyes, too. Equally dazzled. It was a good thing I had this road memorized.What? Bella said, snapping out of her daze she liked thinking of them both being dazzled by each other but still, Hes not even looking at the roadBut he has it memorized thats just as good, Jacob laughed at her expression.That is not good at all Bella snapped, note to self, no dazzling in the car um while its moving at least.And Ill be on your door bright and early Saturday morning, I added, finishing the agreement.She blinked swiftly, shaking her head as if to clear it. Um, she said, it doesnt help with the Charlie situation if an unexplained Volvo is left in the driveway.Hes not going to take his car, Bella said, how little she understood him in this book.Ah, how little she still knew me. I wasn t intending to bring a car.Bella blinked at that and then smiled, it was nice knowing they could think alike.How she started to ask.I interrupted her. The answer would be hard to explain without a demonstration, and now was hardly the time. Dont worry about it. Ill be there, no car.She put her head on one side, and looked for a second like she was going to press for more, but then she seemed to change her mind.Is it later yet? she asked, reminding me of our unfinished conversation in the cafeteria today shed let go of one difficult question just to return another that was more unappealing.Yeah, isnt that nice of her, Jacob chuckled.I suppose it is later, I agreed unwillingly.I parked in front of her house, tensing as I tried to think of how to explainwithout making my monstrous nature too evident, without frightening her again. Or was that wrong? To minimalize my darkness?She waited with the same politely interested mask shed worn at lunch. If Id been less anxious, her preposterous calm would have made me laugh.And you still want to know why you cant see me hunt? I asked.Well, mostly I was wondering about your reaction, she said.Did I frighten you? I asked, positive that she would deny it.No.I tried not to smile, and failed. I apologize for scaring you. And then my smile vanished with the momentary humor. It was just the very thought of you being therewhile we hunted.Jacob shivered at that.That would be bad?The mental picture was too muchBella, so vulnerable in the empty darkness myself, out of control I tried to banish it from my head.Well, you dont have to send it our way, Jacob snapped.Extremely.BecauseI took a deep breath, concentrating for one moment on the burning thirst. Feeling it, managing it, proving my dominion over it. It would never control me againI willed that to be true. I would be safe for her. I stared at the welcome clouds without seeing them, wishing I could believe that my determination would make any difference if I were hunting when I cr ossed her scent.When we huntwe give ourselves over to our senses, I told her, thinking through each word before I spoke it. Govern less with our minds. Especially our sense of smell. If you were anywhere near me when I lost control that wayJacob and Bella both shivered at that. No, she could definitely never see him hunt.I shook my head in agony at the thought of what wouldnot what could, but what wouldsurely happen then.I listened to the spike in her heartbeat, and then turned, restless, to read her eyes.Bellas face was composed, her eyes grave. Her mouth was pursed just slightly in what I guessed was concern. But concern for what? Her own safety? Or my anguish? I continued to stare at her, trying to translate her ambiguous expression into sure fact.Your anguish, Im sure, Jacob mumbled. She puts others before herself.You dont have to make it sound like a bad thing, Bella sighed.She gazed back. Her eyes grew wider after a moment, and her pupils dilated, though the light had not chan ged.My breathing accelerated, and suddenly the quiet in the car seemed to be humming, just like in the darkened biology room this afternoon. The pulsing current raced between us again, and my desire to touch her was, briefly, stronger even than the demands of my thirst.Um this really is pretty freaky, Jacob muttered and Bella rolled her eyes, curious to know what this really meant.The throbbing electricity made it feel like I had a pulse again. My body sang with it. Like I was human. More than anything in the world, I wanted to feel the heat of her lips against mine. For one second, I struggled desperately to fall upon the strength, the control, to able to put my mouth so close to her skinBella froze in place waiting in anticipation heart hammering.Jacob shifted uncomfortably and was wary about how dangerous that would be.She sucked in a ragged breath, and only then did I realize that when I had started breathing faster, she had stopped breathing altogether.I closed my eyes, trying to break the connection between us.No more mistakes.Bella sighed sadly.Bellas existence was tied to a thousand delicately balanced chemical processes, all so easily disrupted. The rhythmic expansion of her lungs, the flow of oxygen, was life or death to her. The fluttering cadence of her fragile heart could be stopped by so many stupid accidents or illnesses orby me.I did not believe that any member of my family would hesitate if he or she were offered a chance backif he or she could mass immortality for mortality again. Any one of us would stand in fire for it. Burn for as many days or centuries as were necessary.But you cant go back, Bella said sadly, which meant that if they were ever going to be equal she would have to changeMost of our kind prized immortality above anything else. There were even humans who craved this, who searched in dark places for those who could give them the blackest of giftsNot us. Not my family. We would trade anything to be human.Right, Jacob said, an d he believed what Edward was saying, it really did explain why they did what they did.But none of us had ever been as desperate for a way back as I was now.I stared at the microscopic pits and flaws in the windshield, like there was some solution hidden in the glass. The electricity had not faded, and I had to concentrate to keep my hands on the wheel.My right hand began to sting without pain again, from when Id touched her before.Bella, I think you should go inside now.She obeyed at once, without comment, getting out of the car and shutting the door behind herself. Did she feel the potential for disaster as clearly as I did?Um Im sure I felt the electricity and noticed that you dont want to touch me, Bella sighed, Im probably just following your lead.Did it hurt her to leave, as it hurt me to let her go? The only solace was that I would see her soon. Sooner than she would see me. I smiled at that, then rolled the window down and leaned across to speak to her one more timeit was sa fer now, with the heat of her body outside the car.She turned to see what I wanted, curious.Still curious, though shed asked me so many questions today.Oh therere so many more questions I have for you, Bella said.My own curiosity was entirely unsatisfied answering her questions today had only revealed my secretsIt looks like hes thinking the same thing, Jacob chuckled.Id gotten little from her but my own conjectures. That wasnt fair.Oh, Bella?Yes?Tomorrow its my turn.Her forehead puckered. Your turn to what?Ask the questions. Tomorrow, when we were in a safer place, surrounded by witnesses, I would get my own answers. I grinned at the thought, and then I turned away because she made no move to leave. Even with her outside of the car, the echo of the electricity zinged in the air. I wanted to get out, too, to walk her to her door as an excuse to stay beside herNo more mistakes. I hit the gas, and then sighed as she disappeared behind me. It seemed like I was always running toward Bel la or running away from her, never staying in place. I would have to find some way to hold my ground if we were ever going to have any peace.Well, thats most definitely true, Bella said. I wonder what hes going to ask me.Well, it looks like youre going to have to wait a long time to figure out, Jacob said putting the book down.Why? Bella said looking at the clock, it was nine. We still have some time.Thats not why, Jacob chuckled. Its because that was the end of the book.What? Bella said. That cant be the end there so much more I dont know what happensSorry, Bells, thats it, Jacob shrugged.Is there at note or anything like that? Bella asked, picking up the book and noticing a small note and readIm sorry that this was all that I could give you, but this was all I could write before you got to school. But there is no need to worry your story goes on for a long time after this.Bella frowned as she read this, how could this person end the book here but promise that there is a lot more f or her to find out? Who is this SM person?Um Im not sure, but its the person that left me the note in the first place, Jacob said.Yeah, I figured, Bella rolled her eyes.So um what do we do now? Jacob asked.Im not sure, Bella said.But youre planning on meeting this Edward guy for real, arent you, Jacob said.Of course, Bella looked at him suspiciously. He had promised at one time that he wouldnt let that happen. She hoped he had changed his mind because there was no way she would allow that.And how do you plan on meeting him at first? Jacob questioned.Um Bella said, she didnt think of that but he was right the first meeting really was something that she had to think about Edward was, after all going to be deathly attracted to her. I suppose well just have to think of something.