Home > Store

Objects First With Java: A Practical Introduction Using BlueJ, 4th Edition

Register your product to gain access to bonus material or receive a coupon.

Objects First With Java: A Practical Introduction Using BlueJ, 4th Edition

Book

  • Sorry, this book is no longer in print.
Not for Sale

About

Features

  • Use of BlueJ to get students started on object-oriented programming:
    • Created specifically for teaching, the BlueJ environment has a strong emphasis on visualization which helps students understand class structure and the nature of objects. 
    • BlueJ uses UML-like diagrams to represent classes and their relationships.  The ease of BlueJ makes the objects-first style of object-oriented programming possible from the beginning.
    • Easy to use, free of charge, and readily available, BlueJ enables students to manipulate objects and call methods as a first exercise.
  • Accompanying CD with JDK, BlueJ, a BlueJ tutorial and code for all the projects.
  • A useful website with resources for students and lecturers, including:
    • Program style guide for all examples in the book.
    • Links to material of further interest.
    • PowerPoint slides that can be downloaded and used as OHTs (lecturers only).
    • Solutions to exercises (lecturers only).
    • Additional activities, exercises and projects for use in teaching (lecturers only).
    • Discussion forum for students and teachers.

Description

  • Copyright 2009
  • Edition: 4th
  • Book
  • ISBN-10: 0-13-606086-2
  • ISBN-13: 978-0-13-606086-4

For introductory courses in Java/Introduction to Programming and Object-Oriented Programming.

With its emphasis on visualization and interaction techniques, teaching students objects from day one is now possible with Objects First with Java, 4/E. It uses BlueJ to get students started on object-oriented programming from day one — unlike most texts, which delay coverage — so that students don’t have to switch thought processes midstream. Barnes and Kolling strategically do not cover traditional topics like control structures, preserving their goal of teaching object-oriented principles.

The authors incorporate a “spiral approach” throughout the text. This introduces a topic in a simple context early on, then revisits it later to increase student comprehension.  This enables the understanding of many topics while broadening knowledge. Loaded with projects, the book is organized around software development tasks versus the language features to promote good problem solving skills.  The number of interesting examples provides student with lots of applications

Sample Content

Table of Contents

Part 1 FOUNDATIONS OF OBJECT ORIENTATION

Chapter 1 Objects and classes

1.1 Objects and classes

1.2 Creating objects

1.3 Calling methods

1.4 Parameters

1.5 Data types

1.6 Multiple instances

1.7 State

1.8 What is in an object?

1.9 Object interaction

1.10 Source code

1.11 Another example

1.12 Return values

1.13 Objects as parameters

1.14 Summary

Chapter 2 Understanding class definitions

2.1 Ticket machines

2.1.1 Exploring the behavior of a naïve ticket machine

2.2 Examining a class definition

2.3 Fields, constructors, and methods

2.3.1 Fields

2.3.2 Constructors

2.4 Passing data via parameters

2.5 Assignment

2.6 Accessor methods 

2.7 Mutator methods

2.8 Printing from methods 

2.9 Summary of the naïve ticket machine

2.10 Reflecting on the design of the ticket machine

2.11 Making choices: the conditional statement

2.12 A further conditional-statement example

2.13 Local variables

2.14 Fields, parameters, and local variables

2.15 Summary of the better ticket machine

2.16 Self-review exercises

2.17 Reviewing a familiar example

2.18 Summary

Chapter 3 Object interaction

3.1 The clock example

3.2 Abstraction and modularization

3.3 Abstraction in software

3.4 Modularization in the clock example

3.5 Implementing the clock display

3.6 Class diagrams versus object diagrams

3.7 Primitive types and object types

3.8 The ClockDisplay source code

3.8.1 Class NumberDisplay

3.8.2 String concatenation

3.8.3 The modulo operator

3.8.4 Class ClockDisplay

3.9 Objects creating objects

3.10 Multiple constructors

3.11 Method calls

3.11.1 Internal method calls

3.11.2 External method calls

3.11.3 Summary of the clock display

3.12 Another example of object interaction

3.12.1 The mail system example

3.12.2 The this keyword

3.13 Using a debugger

3.13.1 Setting breakpoints

3.13.2 Single stepping

3.13.3 Stepping into methods

3.14 Method calling revisited

3.15 Summary

Chapter 4 Grouping objects

4.1 Grouping objects in flexible-size collections

4.2 A personal notebook

4.3 A first look at library classes

4.3.1 An example of using a library

4.4 Object structures with collections

4.5 Generic classes

4.6 Numbering within collections

4.7 Removing an item from a collection

4.8 Processing a whole collection

4.8.1 The for-each loop

4.8.2 The while loop

4.8.3 Iterating over a collection

4.8.4 Index access versus iterators

4.9 Summary of the notebook example

4.10 Another example: an auction system

4.10.1 The Lot class

4.10.2 The Auction class

4.10.3 Anonymous objects

4.10.4 Using collections

4.11 Flexible collection summary

4.12 Fixed-size collections

4.12.1 A log-file analyzer

4.12.2 Declaring array variables

4.12.3 Creating array objects

4.12.4 Using array objects

4.12.5 Analyzing the log file

4.12.6 The for loop

4.13 Summary

Chapter 5 More sophisticated behavior

5.1 Documentation for library classes

5.2 The TechSupport system

5.2.1 Exploring the TechSupport system

5.2.2 Reading the code

5.3 Reading class documentation

5.3.1 Interfaces versus implementation

5.3.2 Using library-class methods

5.3.3 Checking string equality

5.4 Adding random behavior

5.4.1 The Random class

5.4.2 Random numbers with limited range

5.4.3 Generating random responses

5.4.4 Reading documentation for parameterized classes

5.5 Packages and import

5.6 Using maps for associations

5.6.1 The concept of a map

5.6.2 Using a HashMap

5.6.3 Using a map for the TechSupport system

5.7 Using sets

5.8 Dividing strings

5.9 Finishing the TechSupport system

5.10 Writing class documentation

5.10.1 Using javadoc in BlueJ

5.10.2 Elements of class documentation

5.11 Public versus private

5.11.1 Information hiding

5.11.2 Private methods and public fields

5.12 Learning about classes from their interfaces

5.13 Class variables and constants

5.13.1 The static key word

5.13.2 Constants

5.14 Summary

Chapter 6 Well-behaved objects

6.1 Introduction

6.2 Testing and debugging

6.3 Unit testing within BlueJ

6.3.1 Using inspectors

6.3.2 Positive versus negative testing

6.4 Test automation

6.4.1 Regression testing

6.4.2 Automated checking of test results

6.4.3 Recording a test

6.4.4 Fixtures

6.5 Modularization and interfaces

6.6 A debugging scenario

6.7 Commenting and style

6.8 Manual walkthroughs

6.8.1 A high-level walkthrough

6.8.2 Checking state with a walkthrough

6.8.3 Verbal walkthroughs

6.9 Print statements

6.9.1 Turning debugging information on or off

6.10 Choosing a test strategy

6.11 Debuggers

6.12 Putting the techniques into practice

6.13 Summary

Chapter 7 Designing classes

7.1 Introduction

7.2 The world-of-zuul game example

7.3 Introduction to coupling and cohesion

7.4 Code duplication

7.5 Making extensions

7.5.1 The task

7.5.2 Finding the relevant source code

7.6 Coupling

7.6.1 Using encapsulation to reduce coupling

7.7 Responsibility-driven design

7.7.1 Responsibilities and coupling

7.8 Localizing change

7.9 Implicit coupling

7.10 Thinking ahead

7.11 Cohesion

7.11.1 Cohesion of methods

7.11.2 Cohesion of classes

7.11.3 Cohesion for readability

7.11.4 Cohesion for reuse

7.12 Refactoring

7.12.1 Refactoring and testing

7.12.2 An example of refactoring

7.13 Refactoring for language independence

7.13.1 Enumerated types

7.13.2 Further decoupling of the command interface

7.14 Design guidelines

7.15 Executing without BlueJ

7.15.1 Class methods

7.15.2 The main method

7.15.3 Limitations of class methods

7.16 Summary

Part 2 APPLICATION STRUCTURES

Chapter 8 Improving structure with inheritance

8.1 The DoME example

8.1.1 DoME classes and objects

8.1.2 DoME source code

8.1.3 Discussion of the DoME application

8.2 Using inheritance

8.3 Inheritance hierarchies

8.4 Inheritance in Java

8.4.1 Inheritance and access rights

8.4.2 Inheritance and initialization

8.5 DoME: adding other item types

8.6 Advantages of inheritance (so far)

8.7 Subtyping

8.7.1 Subclasses and subtypes

8.7.2 Subtyping and assignment

8.7.3 Subtyping and parameter passing

8.7.4 Polymorphic variables

8.7.5 Casting

8.8 The Object class

8.9 Autoboxing and Wrapper classes

8.10 The collection hierarchy

8.11 Summary

Chapter 9 More about inheritance

9.1 The problem: DoME’s print method

9.2 Static type and dynamic type

9.2.1 Calling print from Database

9.3 Overriding

9.4 Dynamic method lookup

9.5 Super call in methods

9.6 Method polymorphism

9.7 Object methods: toString

9.8 Protected access

9.9 Another example of inheritance with overriding

9.10 Summary

Chapter 10 Further abstraction techniques

10.1 Simulations

10.2 The foxes-and-rabbits simulation

10.2.1 The foxes-and-rabbits project

10.2.2 The Rabbit class

10.2.3 The Fox class

10.2.4 The Simulator class: setup

10.2.5 The Simulator class: a simulation step

10.2.6 Taking steps to improve the simulation

10.3 Abstract classes

10.3.1 The Animal superclass

10.3.2 Abstract methods

10.3.3 Abstract classes

10.4 More abstract methods

10.5 Multiple inheritance

10.5.1 An Actor class

10.5.2 Flexibility through abstraction

10.5.3 Selective drawing

10.5.4 Drawable actors: multiple inheritance

10.6 Interfaces

10.6.1 An Actor interface

10.6.2 Multiple inheritance of interfaces

10.6.3 Interfaces as types

10.6.4 Interfaces as specifications

10.6.5 A further example of interfaces

10.6.6 Abstract class or interface?

10.7 Summary of inheritance

10.8 Summary

Chapter 11 Building graphical user interfaces

11.1 Introduction

11.2 Components, layout, and event handling

11.3 AWT and Swing

11.4 The ImageViewer example

11.4.1 First experiments: creating a frame

11.4.2 Adding simple components

11.4.3 Adding menus

11.4.4 Event handling

11.4.5 Centralized receipt of events

11.4.6 Inner classes

11.4.7 Anonymous inner classes

11.5 ImageViewer 1.0: the first complete version

11.5.1 Image-processing classes

11.5.2 Adding the image

11.5.3 Layout

11.5.4 Nested containers

11.5.5 Image filters

11.5.6 Dialogs

11.6 ImageViewer 2.0: improving program structure

11.7 ImageViewer 3.0: more interface components

11.7.1 Buttons

11.7.2 Borders

11.8 Further extensions

11.9 Another example: SoundPlayer338

11.10 Summary

Chapter 12 Handling errors

12.1 The address-book project

12.2 Defensive programming

12.2.1 Client—server interaction

12.2.2 Argument checking

12.3 Server error reporting

12.3.1 Notifying the user

12.3.2 Notifying the client object

12.4 Exception-throwing principles

12.4.1 Throwing an exception

12.4.2 Exception classes

12.4.3 The effect of an exception

12.4.4 Unchecked exceptions

12.4.5 Preventing object creation

12.5 Exception handling

12.5.1 Checked exceptions: the throws clause

12.5.2 Catching exceptions: the try statement

12.5.3 Throwing and catching multiple exceptions

12.5.4 Propagating an exception

12.5.5 The finally clause

12.6 Defining new exception classes

12.7 Using assertions

12.7.1 Internal consistency checks

12.7.2 The assert statement

12.7.3 Guidelines for using assertions

12.7.4 Assertions and the BlueJ unit testing framework

12.8 Error recovery and avoidance

12.8.1 Error recovery

12.8.2 Error avoidance

12.9 Case study: text input/output

12.9.1 Readers, writers, and streams

12.9.2 The address-book-io project

12.9.3 Text output with FileWriter

12.9.4 Text input with FileReader

12.9.5 Scanner: reading input from the terminal

12.9.6 Object serialization

12.10 Summary

Chapter 13 Designing applications

13.1 Analysis and design

13.1.1 The verb/noun method

13.1.2 The cinema booking example

13.1.3 Discovering classes

13.1.4 Using CRC cards

13.1.5 Scenarios

13.2 Class design

13.2.1 Designing class interfaces

13.2.2 User interface design

13.3 Documentation

13.4 Cooperation

13.5 Prototyping

13.6 Software growth

13.6.1 Waterfall model

13.6.2 Iterative development

13.7 Using design patterns

13.7.1 Structure of a pattern

13.7.2 Decorator

13.7.3 Singleton

13.7.4 Factory method

13.7.5 Observer

13.7.6 Pattern summary

13.8 Summary

Chapter 14 A case study

14.1 The case study

14.1.1 The problem description

14.2 Analysis and design

14.2.1 Discovering classes

14.2.2 Using CRC cards

14.2.3 Scenarios

14.3 Class design

14.3.1 Designing class interfaces

14.3.2 Collaborators

14.3.3 The outline implementation

14.3.4 Testing

14.3.5 Some remaining issues

14.4 Iterative development

14.4.1 Development steps

14.4.2 A first stage

14.4.3 Testing the first stage

14.4.4 A later stage of development

14.4.5 Further ideas for development

14.4.6 Reuse

14.5 Another example

14.6 Taking things further

Appendices

A Working with a BlueJ project

B Java data types

C Java control structures

D Operators

E Running Java without BlueJ

F Configuring BlueJ

G Using the debugger

H JUnit unit-testing tools

I Javadoc

J Program style guide

K Important library classes

Updates

Submit Errata

More Information

InformIT Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from InformIT and its family of brands. I can unsubscribe at any time.

Overview


Pearson Education, Inc., 221 River Street, Hoboken, New Jersey 07030, (Pearson) presents this site to provide information about products and services that can be purchased through this site.

This privacy notice provides an overview of our commitment to privacy and describes how we collect, protect, use and share personal information collected through this site. Please note that other Pearson websites and online products and services have their own separate privacy policies.

Collection and Use of Information


To conduct business and deliver products and services, Pearson collects and uses personal information in several ways in connection with this site, including:

Questions and Inquiries

For inquiries and questions, we collect the inquiry or question, together with name, contact details (email address, phone number and mailing address) and any other additional information voluntarily submitted to us through a Contact Us form or an email. We use this information to address the inquiry and respond to the question.

Online Store

For orders and purchases placed through our online store on this site, we collect order details, name, institution name and address (if applicable), email address, phone number, shipping and billing addresses, credit/debit card information, shipping options and any instructions. We use this information to complete transactions, fulfill orders, communicate with individuals placing orders or visiting the online store, and for related purposes.

Surveys

Pearson may offer opportunities to provide feedback or participate in surveys, including surveys evaluating Pearson products, services or sites. Participation is voluntary. Pearson collects information requested in the survey questions and uses the information to evaluate, support, maintain and improve products, services or sites, develop new products and services, conduct educational research and for other purposes specified in the survey.

Contests and Drawings

Occasionally, we may sponsor a contest or drawing. Participation is optional. Pearson collects name, contact information and other information specified on the entry form for the contest or drawing to conduct the contest or drawing. Pearson may collect additional personal information from the winners of a contest or drawing in order to award the prize and for tax reporting purposes, as required by law.

Newsletters

If you have elected to receive email newsletters or promotional mailings and special offers but want to unsubscribe, simply email information@informit.com.

Service Announcements

On rare occasions it is necessary to send out a strictly service related announcement. For instance, if our service is temporarily suspended for maintenance we might send users an email. Generally, users may not opt-out of these communications, though they can deactivate their account information. However, these communications are not promotional in nature.

Customer Service

We communicate with users on a regular basis to provide requested services and in regard to issues relating to their account we reply via email or phone in accordance with the users' wishes when a user submits their information through our Contact Us form.

Other Collection and Use of Information


Application and System Logs

Pearson automatically collects log data to help ensure the delivery, availability and security of this site. Log data may include technical information about how a user or visitor connected to this site, such as browser type, type of computer/device, operating system, internet service provider and IP address. We use this information for support purposes and to monitor the health of the site, identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents and appropriately scale computing resources.

Web Analytics

Pearson may use third party web trend analytical services, including Google Analytics, to collect visitor information, such as IP addresses, browser types, referring pages, pages visited and time spent on a particular site. While these analytical services collect and report information on an anonymous basis, they may use cookies to gather web trend information. The information gathered may enable Pearson (but not the third party web trend services) to link information with application and system log data. Pearson uses this information for system administration and to identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents, appropriately scale computing resources and otherwise support and deliver this site and its services.

Cookies and Related Technologies

This site uses cookies and similar technologies to personalize content, measure traffic patterns, control security, track use and access of information on this site, and provide interest-based messages and advertising. Users can manage and block the use of cookies through their browser. Disabling or blocking certain cookies may limit the functionality of this site.

Do Not Track

This site currently does not respond to Do Not Track signals.

Security


Pearson uses appropriate physical, administrative and technical security measures to protect personal information from unauthorized access, use and disclosure.

Children


This site is not directed to children under the age of 13.

Marketing


Pearson may send or direct marketing communications to users, provided that

  • Pearson will not use personal information collected or processed as a K-12 school service provider for the purpose of directed or targeted advertising.
  • Such marketing is consistent with applicable law and Pearson's legal obligations.
  • Pearson will not knowingly direct or send marketing communications to an individual who has expressed a preference not to receive marketing.
  • Where required by applicable law, express or implied consent to marketing exists and has not been withdrawn.

Pearson may provide personal information to a third party service provider on a restricted basis to provide marketing solely on behalf of Pearson or an affiliate or customer for whom Pearson is a service provider. Marketing preferences may be changed at any time.

Correcting/Updating Personal Information


If a user's personally identifiable information changes (such as your postal address or email address), we provide a way to correct or update that user's personal data provided to us. This can be done on the Account page. If a user no longer desires our service and desires to delete his or her account, please contact us at customer-service@informit.com and we will process the deletion of a user's account.

Choice/Opt-out


Users can always make an informed choice as to whether they should proceed with certain services offered by InformIT. If you choose to remove yourself from our mailing list(s) simply visit the following page and uncheck any communication you no longer want to receive: www.informit.com/u.aspx.

Sale of Personal Information


Pearson does not rent or sell personal information in exchange for any payment of money.

While Pearson does not sell personal information, as defined in Nevada law, Nevada residents may email a request for no sale of their personal information to NevadaDesignatedRequest@pearson.com.

Supplemental Privacy Statement for California Residents


California residents should read our Supplemental privacy statement for California residents in conjunction with this Privacy Notice. The Supplemental privacy statement for California residents explains Pearson's commitment to comply with California law and applies to personal information of California residents collected in connection with this site and the Services.

Sharing and Disclosure


Pearson may disclose personal information, as follows:

  • As required by law.
  • With the consent of the individual (or their parent, if the individual is a minor)
  • In response to a subpoena, court order or legal process, to the extent permitted or required by law
  • To protect the security and safety of individuals, data, assets and systems, consistent with applicable law
  • In connection the sale, joint venture or other transfer of some or all of its company or assets, subject to the provisions of this Privacy Notice
  • To investigate or address actual or suspected fraud or other illegal activities
  • To exercise its legal rights, including enforcement of the Terms of Use for this site or another contract
  • To affiliated Pearson companies and other companies and organizations who perform work for Pearson and are obligated to protect the privacy of personal information consistent with this Privacy Notice
  • To a school, organization, company or government agency, where Pearson collects or processes the personal information in a school setting or on behalf of such organization, company or government agency.

Links


This web site contains links to other sites. Please be aware that we are not responsible for the privacy practices of such other sites. We encourage our users to be aware when they leave our site and to read the privacy statements of each and every web site that collects Personal Information. This privacy statement applies solely to information collected by this web site.

Requests and Contact


Please contact us about this Privacy Notice or if you have any requests or questions relating to the privacy of your personal information.

Changes to this Privacy Notice


We may revise this Privacy Notice through an updated posting. We will identify the effective date of the revision in the posting. Often, updates are made to provide greater clarity or to comply with changes in regulatory requirements. If the updates involve material changes to the collection, protection, use or disclosure of Personal Information, Pearson will provide notice of the change through a conspicuous notice on this site or other appropriate way. Continued use of the site after the effective date of a posted revision evidences acceptance. Please contact us if you have questions or concerns about the Privacy Notice or any objection to any revisions.

Last Update: November 17, 2020