Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Java > Java and JDK > JSP Basics
|
JSP Basics Beginning-level questions on JSP. More advanced coders should post to Pro JSP.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the JSP Basics 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 September 11th, 2003, 10:07 PM
Registered User
 
Join Date: Sep 2003
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Combine 2 classes

Hi.

I have 2 program.
First program is to open and choose the file to run so it will display the choosen file's path and filename and most importantly - its results on a Window.
Second program is design to run an external file e.g. music.mpeg and count number of services inside this file.

Question is: How do I combine both classes such that the results of the number of services are display on the Window created by the first program upon clicking on a button on the Window e.g. <Count now>?

Pls Help ..
Your help will be greatly appreciated!!

...do U need the codes for the program?... pls tell me..thanks
 
Old September 12th, 2003, 04:05 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 175
Thanks: 0
Thanked 0 Times in 0 Posts
Default

If you combine the two classes you will violate some of the basic principals of object oriented development, which is that objects should be loosely coupled and be cohesive.

Why not write a simple driver program that instantiates the first class, which subsequently returns the count. The driver can then the instantiate the second class, passing the count as a parameter.

Regards

Martyn





Similar Threads
Thread Thread Starter Forum Replies Last Post
combine the nodes pravind XSLT 3 April 23rd, 2007 01:11 PM
Is it possible to combine two forms into one? malhyp Dreamweaver (all versions) 13 June 5th, 2006 07:29 AM
How to combine two value-of selects? myhtpc XSLT 2 February 14th, 2006 06:20 AM
Best Way To Combine Reports ? jkirst BOOK: Professional SQL Server Reporting Services ISBN: 0-7645-6878-7 0 May 16th, 2005 09:56 AM
combine 2 queries collie SQL Server 2000 2 November 29th, 2004 03:09 PM





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