Example: dental hygienist

Java Programming For Kids - myflex.org

JavaTM Programming for Kids, Parents and GrandParents Yakov Fain Java Programming for Kids, Parents and Grandparents iii Java Programming for Kids, Parents and Grandparents by Yakov Fain Copyright 2004 Smart Data Processing, Inc. 14 Molly Pitcher Dr. Manalapan, New Jersey, 07726, USA All rights reserved. No part of this book may be reproduced, in any form or by any, without permission in writing from the publisher.

Select release J2SE 1.5.0 or the newer one, and on the next Web page under the title Downloads click on the link to this release. Then click on the word Download under the title SDK. Accept the license agreement and select Windows Offline Installation (unless you have a Mac, Linux or Solaris computer). Press the button

Tags:

  Select

Information

Domain:

Source:

Link to this page:

Please notify us if you found a problem with this document:

Other abuse

Transcription of Java Programming For Kids - myflex.org

1 JavaTM Programming for Kids, Parents and GrandParents Yakov Fain Java Programming for Kids, Parents and Grandparents iii Java Programming for Kids, Parents and Grandparents by Yakov Fain Copyright 2004 Smart Data Processing, Inc. 14 Molly Pitcher Dr. Manalapan, New Jersey, 07726, USA All rights reserved. No part of this book may be reproduced, in any form or by any, without permission in writing from the publisher.

2 Cover design and illustrations: Yuri Fain Adult technical editor: Yuri Goncharov Kid technical editor: David Fain May 2004: First Electronic Edition The information in this book is distributed without warranty. Neither the author nor the publisher shall have any liability to any person or entitle to any liability, loss or damage to be caused directly or indirectly by instructions contained in this book or by the computer software or hardware products described herein. Java and all Java-based trademarks and logos are trademarks or registered trademarks of Sun Microsystems, Inc.

3 In the United States and other countries. Windows 98, Windows NT, Windows 2000 and Windows XP are trademarks of Microsoft Corporation. All other product names and company names are the property of their respective owners. The publisher offers discount on this book when ordered in bulk quantities. For more information, send an e-mail at ISBN: 0-9718439-5-3 Table of Contents CHAPTER 1. YOUR FIRST JAVA How to Install Java on Your Three Main Steps in Step 1 Type the Step 2 Compile the 8 Step 3 Run the Additional Reading.

4 10 CHAPTER 2. MOVING TO Installing Getting Started with Creating Programs in 15 Running HelloWorld in How HelloWorld Works?..17 Additional Reading ..20 Practice for Smarty CHAPTER 3. PET AND FISH JAVA Classes and Objects ..22 Data Creation of a Inheritance a Fish is Also a Pet .. 33 Method Additional Reading ..38 Practice for Smarty Java Programming for Kids, Parents and Grandparents v CHAPTER 4. JAVA BUILDING 40 Program Comments .. 40 Making Decisions with if 41 Logical 43 The logical not here is applied to the expression in parentheses.

5 44 Conditional 44 Using else 44 Making Decisions With switch 45 How Long Variables Live? .. 46 Special Methods: Constructors ..47 The Keyword 48 49 Repeating Actions with Loops .. 51 Additional Reading .. 54 54 Practice for Smarty 54 CHAPTER 5. A GRAPHICAL 55 AWT and Swing .. 55 Packages and Import 55 Major Swing Elements .. 56 Layout 59 Flow Layout .. 59 Grid Layout .. 60 Border Layout .. 62 Combining Layout Managers .. 62 Box 65 Grid Bag 66 Card 68 Can I Create Windows Without Using Layouts? .. 68 Window Components.

6 68 Additional Reading .. 72 72 Practice for Smarty 73 CHAPTER 6. WINDOW Action Registering Components with What s the Source of an Event? ..79 How to Pass Data Between Finishing Some Other Event Listeners .. 89 How to Use Additional Reading ..91 Practice for Smarty CHAPTER 7. THE TIC-TAC-TOE Learning HTML in 15 Writing Applets Using AWT ..96 How to Write AWT Applets ..97 Writing a Tic-Tac-Toe Game ..99 The The Additional Reading ..110 Practice for Smarty CHAPTER 8. PROGRAM ERRORS - Reading the Stack Genealogical Tree of The keyword The Keyword The Keyword Creating New 121 Additional Reading.

7 123 Java Programming for Kids, Parents and Grandparents vii Practice for Smarty 123 CHAPTER 9. SAVING THE GAME 124 Byte Streams .. 124 Buffered 127 Command-Line 129 Reading Text Files .. 132 Class 135 Additional Reading .. 137 137 Practice for Smarty 138 CHAPTER 10. MORE JAVA BUILDING 139 Working with Date and Time Values .. 139 Method Overloading .. 140 Reading Keyboard Input .. 143 More on Java 145 Access 148 Getting Back to Arrays .. 151 Class 154 Additional Reading .. 158 158 Practice for Smarty 159 CHAPTER 11.

8 BACK TO GRAPHICS THE PING PONG 160 The 160 The Code .. 161 Java Threads Basics .. 169 Finishing Ping Pong Game ..175 What to Read Next on Game Programming .. 185 Additional Reading .. 186 186 Practice for Smarty APPENDIX A. JAVA ARCHIVES - Additional Reading ..189 APPENDIX B. ECLIPSE Eclipse APPENDIX C. HOW TO PUBLISH A WEB Additional Reading ..197 Java Programming for Kids, Parents and Grandparents ix Preface One day my son Davey-steamboat showed up in my office with my rated R Java tutorial in his hands.

9 He asked me to teach him Programming so he could create computer games. At that time I ve already written a couple of books on Java and taught multiple classes about computer Programming , but all of this was for grownups! A search on Amazon could not offer anything but books for dummies, but Davey is not a dummy! After spending hours on Google I found either some poor attempts to create Java courses for kids, or some reader-rabbit-style books. Guess what? I decided to write one. To help me understand the mentality of the little people, I decided to ask Davey to become my first kid student.

10 This book will be useful for the following groups of people Kids from 11 to 18 years old School computer teachers Parents who want to teach their kids Programming Complete beginners in Programming (your age does not matter) Even though I use a simple language while explaining Programming , I promise to treat my readers with respect - I m not going to write something like Dear friend! You are about to begin a new and exciting . Yeah, right! Just get to the point! First chapters of the book will end with simple game-like programs with detailed instructions on how to make them work.


Related search queries