Elizabeth Sugar Boese
Colorado State University
This book is a gentle introduction to the art of programming, focusing on giving you the tools to create sophisticated programs fast. It assumes you have never programmed before, and explains the necessary concepts to get up and running but avoids the drudgery of understanding all the minute details going on behind the scenes. It is intended to motivate and excite you to the fun of programming. Everything is based on graphics and specifically applets, which enable you to put all of your work up on the Internet. And the last chapter explains how and where to put your applets on the Internet.
There has been a nation-wide trend of dis-interest in computer science. This book excites students by having them create very cool and impressive programs, giving them the tools to create whatever they envision. The concentration is on getting them to succeed with interesting examples, and not dwell on nitty gritty details that tend to frustrate new programmers and lead to their dis-interest.
The examples are all graphical Java applets, which can be put directly on to the Internet. Each example has the full code displayed in the text, so there's no confusion on how to incorporate a code fragment in to a full program.
The book is updated based on Java 1.5 using the capabilities of Swing components.
You learn how to create applets and put them on the Internet, to show off to your family and friends.
The book explains the essentials but leaves out the nitty gritty detail. This gives the strength of learning more of the neat stuff that can be done in applets and less time worrying about memory structures and parameter passing details.
The examples all use the standard Java API, not a custom package. This enables you to be able to understand other code examples from other books and on the Internet, and not be dependent on only knowing how to program using special code specific to a book. Note: This is a big problem found in most other books!
The examples are creative, giving you a chance to think outside-the-box. For example, learn how to create your own fonts, how to have an image as a backdrop with your buttons on top, how to create a slideshow by either using buttons or an automated rotation.
Each chapter contains exercises to practice and think more about the material presented.
Examples include callouts to help direct attention to the new and/or important concepts in the example. New material highlighted and colored blue to distinguish.
A workbook is also available with lab exercises and slides with fill-in-the-blank. Instructors can receive the slides with blanks filled in. The fill-in-the-blank style has been more successful in gaining students' attention during lectures as well as help them learn how to study for what's important.
This material has been used successfully for two semesters in a non-majors course at Colorado State University. Students are able to produce sophisticated and very creative projects by the end of the semester. For example, "Where's Waldo" game, football statistics and details for every team, "Stephanie's Closet" where you can rotate her shirts and/or pants to select what to wear, word search, sound mixer and much more. To see some examples of what students have produced recently, go to:
Teaching Objects-first vs. procedural programming is currently a huge debate for introductory courses. This book follows a natural approach - procedural with emphasis on using methods, and creating classes when necessary (e.g., extending the JPanel class to create a custom widget). It is presented in an as-needed basis; when we need to create our own custom font, we need this separate class.
The book includes lots of examples in every chapter and exercises at the end of each chapter. Examples are shown with graphical display of the output. There are also boxed pointers for nuances and important reminders throughout the book.
Code examples in the book are available for download from the Internet. A supplemental workbook will be finished by the author by mid-March 2006. The workbook will contain the slides with fill-in-the-blanks for the student to fill in during lecture, and lab exercises that walk the student through full programs and additional ideas for expanding on the lab program and/or other lab ideas. PowerPoint slides will also be available by mid-March 2006 but should only be accessible by instructors. Quiz/Test question set will be available for instructors, as well as a WebCT quiz bank available by mid-April. A simplified API will also become available by summer for students to easily look up methods available for each class.
I will also be a very available author, as I have become a strong supporter of authors such as John Lewis "Java Software Solutions" partly because he is nice and responsive in emails. This is such a relief as an instructor compared to other authors I have tried to deal with in the past.
This book is intended for introductory programming courses and works well for non-majors and/or middle/high-school students, and also ideal for CIS/MIS information systems courses.
I have used half the material in Spring 2005 and 90% of the material Fall 2005 and 100% in Spring 2006 in my intro to programming course for non-majors (computer science department). Will be using it again this Spring 2006 semester as well.
It was very successful; the students commented on their excitement of being able to do such cool programs when they are not even computer science majors (history, education, natural resources, etc). Most students taking the majors course (no graphics) were very jealous. The students raved how they emailed their friends and families the link to their semester projects available on the Internet. We've also had many students convert to computer science or our ACT degree in the computer science department, or pick up computer science as a minor. Examples of programs students did last semester include a "Where's Waldo", "Stephanie's Closet" where the user can rotate through her clothes to see how outfits can be matched (including a slideshow), a word-search, Jeopardy and an audio mixer. These applets are available over the Internet at the site: http://www.cs.colostate.edu/~cs150/home.html
Chapter 1 introduces the programming process. This begins with explaining why programming is important, even if your major is not computer science. Describes the different languages: machine, assembly, high-level and how the source code compiles to bytecode and interpreter translates to machine code before executing. Introduces the fundamental structure of the Java applet code. Steps through creating the first applet based on a Linux machine (using pico).
Chapter 2 explains drawing shapes and text on the applet. Introduces the coordinate system, how to draw lines, rectangles, ovals, arcs and write text with different fonts on the applet. Also explains how to change colors while drawing/writing.
Chapter 3 discusses some basics of variables and how to segment the code in to methods. Explains basics of variables: declaration and initialization, assignment, reference, and scope. Explains the structure of the method, and three reasons for using methods including examples.
Chapter 4 discusses the use and manipulation of images, an essential media in applets. Discusses the differences between .jpg, .gif and .png. Explores how to minimize file size.
Chapter 5 introduces form widgets such as labels, buttons, lists and text boxes. Includes basic HTML that can be used inside these widgets. Explains how to add images to these widgets.
Chapter 6 discusses the different layout managers to display the widgets. Presents a way to structure a program with methods based on a BorderLayout format, with methods for each region.
Chapter 7 talks about design, including how to layout an applet on paper designating all the panels and layout managers before attempting to program it.
Chapter 8 explores the tabbed pane and how to extend the JPanel class to create custom components (including custom fonts).
Chapter 9 revists variables in more detail and mathematical operations. Explains instance variables. Shows how to convert between text and numbers.
Chapter 10 discusses the if and if-else conditional statements.
Chapter 11 introduces events and method stubs.
Chapter 12 explores how to pop up a new frame and discusses some common methods
that can be used on widgets.
Chapter 13 explains loops.
Chapter 14 explores some problem solving techniques as well as GUI design.
Chapter 15 covers arrays and tables.
Chapter 16 discusses enhancements with borders and tooltips.
Chapter 17 explains audio.
Chapter 18 details how to display web pages inside the applet with JEditorPane.
Chapter 19 explains threads and timers for slideshows and animation.
Chapter 20 contains some nifty tricks such as background images on panels, flipping through tabs in a JTabbedPane via buttons, and buttons with state.
Chapter 21 introduces the concept of game programming, based on simple sprites.
Chapter 22 concludes with a discussion about Java and comparing it to other languages, what object-oriented is, how to host applets on the Internet, and some additional third-party libraries that could be integrated into the programming environment to extend the capabilities of development.
I graduated with a Bachelor's degree in Computer Science from Penn State University in 1995. I then worked as a consultant for almost 2 years, before spending 7 months travelling around the world. Fell in love with New Zealand so I found a job as a Systems Analyst (glorified programmer) for just over 2.5 years before jetting off to be a ski/snowboard instructor for the season in Fernie. Upon returning to the United States, I began teaching at DTC (now DeVry) in Denver and at Colorado State University while I worked on my Master's degree. Finished a master's in computer science last Spring 2005 and now continuing to work towards a Ph.D.
I have been teaching at CSU as a full-time faculty member since January of 2002. We first introduced this course in Fall of 2003 and I have taught it each semester and half of one summer session. I also teach two other courses each semester, usually in the introductory range in computer science.
© E.S.Boese. All