Интернет-магазин ШОПС. Нужные товары для Вашего дома, сада, автомобиля

Java Programming for Kids, Parents and GrandParents

  • Заявить о правах (Abuse)
Автор: admin от 2021-03-13, 18:15:59
Java Programming for Kids, Parents and GrandParents Автор: Fain Y.
Язык: English
Издательство: в бумажном виде книга не издавалась (Electronic Edition)
Жанр: Программирование
Год: 2004
Формат: pdf
Размер: 13 мб

This free Java e-book is written for kids from 11 to 80 years old and for school computer teachers, parents who want to get their child into the world of computer programming and college students who are looking for a supplement to overcomplicated textbooks.

Оглавление
PREFACE .............................................................................................. IX
ACKNOWLEDGEMENTS ............................................................................. XI
CHAPTER 1. YOUR FIRST JAVA PROGRAM .................................................... 1
How to Install Java on Your Computer .................................................................................... 2
Three Main Steps in Programming .......................................................................................... 6
Step 1 – Type the Program ...................................................................................................... 6
Step 2 – Compile the Program ................................................................................................. 8
Step 3 – Run the Program ........................................................................................................ 9
Additional Reading ................................................................................................................. 10
CHAPTER 2. MOVING TO ECLIPSE.............................................................. 11
Installing Eclipse ..................................................................................................................... 11
Getting Started with Eclipse ................................................................................................... 13
Creating Programs in Eclipse ................................................................................................. 15
Running HelloWorld in Eclipse ........................................................................................... 16
How HelloWorld Works? .................................................................................................... 17
Additional Reading ................................................................................................................. 20
Practice .................................................................................................................................... 20
Practice for Smarty Pants ....................................................................................................... 21
CHAPTER 3. PET AND FISH – JAVA CLASSES .............................................. 22
Classes and Objects ................................................................................................................. 22
Data Types............................................................................................................................... 25
Creation of a Pet ..................................................................................................................... 28
Inheritance – a Fish is Also a Pet ............................................................................................ 33
Method Overriding ................................................................................................................. 37
Additional Reading ................................................................................................................. 38
Practice .................................................................................................................................... 38
Practice for Smarty Pants ....................................................................................................... 39 Java Programming for Kids, Parents and Grandparents v
CHAPTER 4. JAVA BUILDING BLOCKS ....................................................... 40
Program Comments ................................................................................................................ 40
Making Decisions with if Statements .................................................................................... 41
Logical Operators ................................................................................................................... 43
The logical not here is applied to the expression in parentheses. ........................................... 44
Conditional operator ............................................................................................................... 44
Using else if ....................................................................................................................... 44
Making Decisions With switch Statement .......................................................................... 45
How Long Variables Live?...................................................................................................... 46
Special Methods: Constructors ............................................................................................... 47
The Keyword this ................................................................................................................. 48
Arrays ...................................................................................................................................... 49
Repeating Actions with Loops ................................................................................................ 51
Additional Reading ................................................................................................................. 54
Practice .................................................................................................................................... 54
Practice for Smarty Pants ....................................................................................................... 54
CHAPTER 5. A GRAPHICAL CALCULATOR ................................................... 55
AWT and Swing ...................................................................................................................... 55
Packages and Import Statements ............................................................................................ 55
Major Swing Elements ............................................................................................................ 56
Layout Managers .................................................................................................................... 59
Flow Layout .......................................................................................................................... 59
Grid Layout........................................................................................................................... 60
Border Layout ....................................................................................................................... 62
Combining Layout Managers................................................................................................. 62
Box Layout ........................................................................................................................... 65
Grid Bag Layout.................................................................................................................... 66
Card Layout .......................................................................................................................... 68
Can I Create Windows Without Using Layouts? .................................................................... 68
Window Components .............................................................................................................. 68
Additional Reading ................................................................................................................. 72
Practice .................................................................................................................................... 72
Practice for Smarty Pants ....................................................................................................... 73
CHAPTER 6. WINDOW EVENTS ................................................................. 74
Interfaces ................................................................................................................................. 75
Action Listener ........................................................................................................................ 76
Registering Components with ActionListeneter ........................................................... 78
What’s the Source of an Event? ............................................................................................. 79
How to Pass Data Between Classes ......................................................................................... 81
Finishing Calculator ................................................................................................................ 83
Some Other Event Listeners .................................................................................................. 89
How to Use Adapters ............................................................................................................... 90
Additional Reading ................................................................................................................. 91
Practice .................................................................................................................................... 91
Practice for Smarty Pants ....................................................................................................... 91
CHAPTER 7. THE TIC-TAC-TOE APPLET ..................................................... 92
Learning HTML in 15 Minutes .............................................................................................. 93
Writing Applets Using AWT ................................................................................................... 96
How to Write AWT Applets.................................................................................................... 97
Writing a Tic-Tac-Toe Game .................................................................................................. 99
The Strategy .......................................................................................................................... 99
The Code ............................................................................................................................ 100
Additional Reading ............................................................................................................... 110
Practice .................................................................................................................................. 110
Practice for Smarty Pants ..................................................................................................... 111
CHAPTER 8. PROGRAM ERRORS - EXCEPTIONS ........................................ 112
Reading the Stack Trace ....................................................................................................... 113
Genealogical Tree of Exceptions ........................................................................................... 114
The keyword throws ........................................................................................................... 117
The Keyword finally ...................................................................................................... 118
The Keyword throw .......................................................................................................... 119
Creating New Exceptions ...................................................................................................... 121
Additional Reading ............................................................................................................... 123
Practice .................................................................................................................................. 123 Java Programming for Kids, Parents and Grandparents vii
Practice for Smarty Pants ..................................................................................................... 123
CHAPTER 9. SAVING THE GAME SCORE ................................................... 124
Byte Streams ......................................................................................................................... 124
Buffered Streams .................................................................................................................. 127
Command-Line Arguments .................................................................................................. 129
Reading Text Files ................................................................................................................. 132
Class File ............................................................................................................................ 135
Additional Reading ............................................................................................................... 137
Practice .................................................................................................................................. 137
Practice for Smarty Pants ..................................................................................................... 138
CHAPTER 10. MORE JAVA BUILDING BLOCKS ......................................... 139
Working with Date and Time Values.................................................................................... 139
Method Overloading ............................................................................................................. 140
Reading Keyboard Input ...................................................................................................... 143
More on Java Packages ......................................................................................................... 145
Access Levels ......................................................................................................................... 148
Getting Back to Arrays ........................................................................................................ 151
Class ArrayList ................................................................................................................. 154
Additional Reading ............................................................................................................... 158
Practice .................................................................................................................................. 158
Practice for Smarty Pants ..................................................................................................... 159
CHAPTER 11. BACK TO GRAPHICS – THE PING PONG GAME ..................... 160
The Strategy .......................................................................................................................... 160
The Code ............................................................................................................................... 161
Java Threads Basics .............................................................................................................. 170
Finishing Ping Pong Game .................................................................................................... 175
What to Read Next on Game Programming ......................................................................... 185
Additional Reading ............................................................................................................... 186
Practice .................................................................................................................................. 186
Practice for Smarty Pants ..................................................................................................... 186
APPENDIX A. JAVA ARCHIVES - JARS ...................................................... 188
Additional Reading ............................................................................................................... 189
APPENDIX B. ECLIPSE TIPS .................................................................... 190
Eclipse Debugger ................................................................................................................... 191
APPENDIX C. HOW TO PUBLISH A WEB PAGE ......................................... 194
Additional Reading ............................................................................................................... 197
Practice .................................................................................................................................. 197
INDEX .................................................................................................... 198

Бизиборды EVOTOYS от производителя





My-shop.ru: самый большой выбор детских игрушек в Рунете My-shop.ru - книжный Интернет-магазин My-shop.ru - Интернет-магазин для учителей My-shop.ru - Интернет-магазин учебной литературы
Интернет-магазин детских игрушек Книжный интернет-магазин Интернет-магазин для учителей Интернет-магазин учебной литературы
       

My-shop.ru - Ваш Интернет-магазин My-shop.ru - детский Интернет-магазин My-shop.ru - Интернет-магазин товаров для рукоделия My-shop.ru - Интернет-магазин товаров для образования
Интернет-магазин с более 700000 товаров Интернет-магазин товаров для детей Интернет-магазин товаров для рукоделия Интернет-магазин товаров для образования
       


 


BooksKeeper - электронная библиотека, ежедневно пополняемая нашими авторами.
Все материалы, представленные на нашем сайте, Вы сможете скачать по ссылкам различных бесплатных файлообменников совершенно бесплатно!
Инструкции, поясняющие, как надо качать бесплатно с файлообменников смотреть тут
Регистрация на нашем сайте позволит Вам добавлять свои книги, а также комментировать опубликованные книги, общаться с нашими авторами.
Для этого мы рекомендуем Вам зарегистрироваться либо войти на сайт под своим именем.

Теги: Литература, Книга, Электронная книга, Издание


Информация
Посетители, находящиеся в группе Гости, не могут оставлять комментарии к данной публикации.

Размещение Вашего баннера на книжном сайте BEGET - первые 30 дней хостинга БЕСПЛАТНО! HostLife - лучший платный хостинг
Баннер или тизер? Выбирай! BEGET - первые 30 дней хостинга БЕСПЛАТНО! HostLife - лучший платный хостинг!
Размещение Вашего баннера на нашем сайте - это дешевая реклама Ваших сайтов или партнерских программ! Стабильный, профессиональный и ОЧЕНЬ выгодный хостинг на сегодняший день! Бонусы, акции - все для Вас! Отличный хостинг по цене от 1.87$/месяц! Рекомендация от сайта Bookskeeper.ru!


Бесплатная электронная библиотека. Скачать книги бесплатно!

Наша электронная библиотека Bookskeeper.ru - это интернет-витрина, где любой посетитель может публиковать электронные варианты книг, журналов, газет, комиксов, в общем, любой литературы со ссылками для медленного, но бесплатного скачивания с файлообменников.

В нашем книжном хранилище Вы всегда найдете литературу на любой вкус человека любого возраста - от детских комиксов и расскрасок до серьезной научной литературы.
 
 

Реклама


Секреты заработка в интернете пенсионерам

Садовые печи-барбекю от компании Династия

Аукцион-ОСАГО.рф - Сервис для снижения Ваших расходов на ОСАГО

Как переехать в Европу. Инструкция по иммиграции


AliExpress RU&CIS



Labirint.ru - ваш проводник по лабиринту книг



Альпина Паблишер




Book24.ru - книжный интернет магазин



BEGET - первые 30 дней хостинга БЕСПЛАТНО!



Интернет-магазин ШОПС. Нужные товары для Вашего дома, сада, автомобиля