Wrox Programmer Forums
|
BOOK: Java Programming 24-Hour Trainer by Yakov Fain
This is the forum to discuss the Wrox book Java Programming 24-Hour Trainer by Yakov Fain; ISBN: 978-0-470-88964-0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Java Programming 24-Hour Trainer by Yakov Fain section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 26th, 2011, 08:49 AM
Registered User
 
Join Date: Mar 2011
Posts: 4
Thanks: 0
Thanked 1 Time in 1 Post
Default Listing 4-4

I had a couple of requests to provide more explanations regarding Listing 4-4. This was an illustration of how an instance of the class A can pass a reference to itself to an instance B. For example, There is SomeOtherClass that knows how to verify Tax and as a result can later modify some public variable(s) on the object Tax.

The object Tax passes reference to itself verifyTax(this), the instance of SomeOtherClass can do some calculations and call a method to set the results on Tax.

There is a more concrete example of passing references between the objects on page 93, where Calculator (the UI class) passes the reference to itself to CalculatorEngine - this one does the calculations and then changes the display field content on the Calculator as in Listing 9-7.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Listing 2-15 alxndr000 BOOK: Professional ASP.NET 3.5 : in C# and VB ISBN: 978-0-470-18757-9 0 June 16th, 2010 03:26 PM
Listing 8-10 and Listing 8-16. Asp.Net BOOK: Professional ASP.NET 2.0 and Special Edition; ISBN: 978-0-7645-7610-2; ISBN: 978-0-470-04178-9 1 February 6th, 2008 01:11 PM
Listing 11-6 Asp.Net BOOK: Professional ASP.NET 2.0 and Special Edition; ISBN: 978-0-7645-7610-2; ISBN: 978-0-470-04178-9 0 November 6th, 2006 03:15 PM
Listing 22-6 bpdsmark BOOK: Professional ASP.NET 2.0 and Special Edition; ISBN: 978-0-7645-7610-2; ISBN: 978-0-470-04178-9 2 March 26th, 2006 01:29 PM
Listing members quiksilverhg Excel VBA 1 October 6th, 2005 05:09 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.