Remove inheritance but keep polymorphism?

2265 byte By stcinifeica at 2007-10-3 0:35:32
Hi guys,over the years our code has gotten very complex and there are some very long inheritance chains. I would like to break this up using composition. e.g.class V1{public void doSomethingElse(){}public V1(){doSomethingElse();}}class V2 extends V1{public V2(){super();}//Overridden method used ...

How to remember the path while traverse a binary tree?

818 byte By since81a at 2007-10-3 0:37:02
Hi, again, I have difficulty handling tree search problems. The quesion is How to search for a node from a binary tree A, return true if found meanwhile generate the path which can be used to locate the node.I think the signature should be:// The path contains only 0s and 1s. 0 means go left ...

polyphase and balanced sorting

123 byte By mark_morrison_fun@yahoo.fra at 2007-10-3 0:38:32
please could any one help me in findind source code in java for polyphase and balanced sortingthx for advance

Implementing Simulator Using Reflection

1168 byte By HypnotiCa at 2007-10-3 0:38:46
hey my friends,I'm working on implementing a Simulator for PIC Microcontroller which executes Assembly instructions and makes appropriate changes in Register File and Memory.The way I execute instructions is as follows:I have an abstract parent class called Instruction, then I made each ...

A good way to do scrolling in games?

431 byte By Edstera at 2007-10-3 0:39:43
So here's my problem ... I've got a huge image (much bigger than 1280x1024) I want to use as a background. What would be a nice way of scrolling around this big image like other RTS games out there without having to make the whole huge image redraw itself at a different coordinate. It's ...

Scheduling application

1314 byte By serezhaa at 2007-10-3 0:40:59
I need help on design in class scheduling application for my university. The data is taken from xml file which is a database transformation to xml. My classes reflect xml file:Instructor, Course, Department, Room, Semester, Schedule.Schedule is an entity that has instructor, course, room, ...

UI: A class of its own or built by objects?

193 byte By ThomasOwensa at 2007-10-3 0:41:05
Should the UI be an object in and of itself or should the top-level container be built and maintained by a UI object while the components to this are designed and added by other objects.

Generate different cominations of a word

206 byte By Sarayu_Geethajalia at 2007-10-3 0:44:06
Hi,How do I generate different cominations of a word.Eg: TestTESTTEst TESt TesT ...............Please let me know .Thanks,Sarayu.

Matcher

1140 byte By Sarah_Mahdavia at 2007-10-3 0:45:14
Hi,i have a larg number of item seperated by semicolons and stroed in a String object.each item could includ pattern...we have following patterns:1- * (Asterisks)Use asterisk to filter on a match of zero or more characters.2- ! (Exclamation Mark)Use exclamation mark to filter the search using ...

How to use special characters in regular expression

246 byte By viru@suna at 2007-10-3 0:49:26
HI all, I am new to regular expression.Can any one please tell me the regular expression for characters which are used in regular expression like " [({. tetc.Is there any particular expression to prefix before using these characters

Designing login screen

294 byte By el_killer_rifaa at 2007-10-3 0:52:08
Hi gus!:I have a question: Which approach is better? - From the login dialog instantiate the main Window of the application or - Begin the application, then show de login dialog and if the username is valid, dispose the dialog and return to the main appThanks

Admin a chat room..please help..

390 byte By rnporter@hotmail.co.uka at 2007-10-3 0:54:49
hello, i am starting a new website and i am in need of a free chat room, the features i need are:be able to administrate it, be able to chuck people out of itbasicly i need a chat room where i have specail powerei need one urgent, can anyone help. if it means me building one thats ok, just i ...

MiniMax Algorithm with Alpha Beta pruning

3712 byte By jon.dmml@gmail.coma at 2007-10-3 1:02:58
I successfully implemented a minimax algorithm whoever when alpha beta pruning is added, the algorithm does not function correctly. Here is the code currently being used as the algorithm:public int Negamax(int depth, char[][] charBoard, int player, int alpha, int beta){int score = 0;char ...

null checks

267 byte By kollareddya at 2007-10-3 1:03:33
Hi all,While designing an application, what are the basic guidelines for the following:1. when to make a NOT NULL check on objects. 2. when to throw an exception in case of an object being null, in a use case flow.Thanks in advance.

response time

197 byte By kollareddya at 2007-10-3 1:03:36
Hi all,I would like to know design strategies for applications where the response time is critical.Any pointers to any related articles is appreciated.thanks in advance.

Are RSS Feeds free ?

510 byte By tchristiana at 2007-10-3 1:05:00
Hi,So, I was going to build a website about sports, and I try to find the standings, results, players, clubs and everything else, but I don't think most of the site, for example www.mlsnet.com (US Soccer) even provides RSS Feeds.Most FREE rss feeds that I found were all about NEWS...Somehow, I ...

test polygon interior

159 byte By radim.slovaceka at 2007-10-3 1:06:12
Hi, I have general N-vertex polygon. It is exists any class, where is implemented method for test if specified point is inside this polygon?Radim

Hibernate, DAO pattern, and other related issues

2156 byte By jds@ku.edua at 2007-10-3 1:06:33
I joined a team of developers that are putting together an app to help museum managers track the contents of the museums. The app uses Hibernate to deal with persistence. I've got lots of Java experience under my belt, but most of it was for apps with no persistence requirements, so this is ...

Multi-User Dungeon

221 byte By Phill_Liverpoola at 2007-10-3 1:07:20
Im trying to find tutorials to do multi-user games of varous kinds e.g. online multi user games & Multi-User Dungeon gamescan anyone help? if you can email me @ carter1783@hotmail.comthanks

Using DAO and DTO, or changing Patterns

2861 byte By zyphosa at 2007-10-3 1:08:15
I have been working on a web project that revolves around scheduling events and enrolling people is said events. The schema is fairly straight forward, but does not lend itself well to OO, or at least what I have been used to. Before I get to the questions, I'll layout the basic idea of the ...

Is any one to comment on my OO Design? Anyone and everyone is invited..

5496 byte By Jameel.Khana at 2007-10-3 1:08:32
Hi to all design gurus I am designing an application for lawn tennis match using java to track the score of tennis match .The input to the application will just be which of the 2 players won a point. Based on this, the program needs to compute and display the current score.e.g., Input( who won) ...

newbie image loading problem

1489 byte By 00a at 2007-10-3 1:08:44
im trying to load in some images half way through my game....but i dont want the applet to suddenly stop whilst this happens........here's my code at the mo, it doesnt seem to work....am i going along the right tracks, any advice would be greati call the loadPic functions from the mousePressed ...

can any one help JFrame

4242 byte By benzspidaa at 2007-10-3 1:09:37
Just stated learning Java. trying to create a java EmailFrame which will display a blank Submission Complete message.but i keep getting error message when ever I try to compile the code.error (Can not find symbol symbol method submit)this is what my script looks like import java.awt.*;import ...

Struts -> Hibernate

1231 byte By Petersona at 2007-10-3 1:12:11
Hi,I am currently working on a small (for me quite large) project with Struts. Some basic InformationI am quite new to J2ee applications but decided to work with Struts, because there are more references of tutorials and I have little experience in it.For O/R mapping I use Hibernate.Now my ...

Easy to understand and follow OO design.

649 byte By iain_8a at 2007-10-3 1:12:41
Has anyone ever found that when they have to fix a simple bug in a large OO application, that so many complex patterns, abstactions, polymorphism, and an excessive numbers of interfaces make the code very difficult to navigate, and that you have to study for hours to get your head around the ...

Face Recognition Application

540 byte By citymodela at 2007-10-3 1:13:01
I m a student of Computer Science and working on my first project of the career. i have been assigned the project of Face Recognition Application. i have been working on it since one month but i m not satisfied to what i have worked. i m lover of java so i want to implement it in java. i have ...

Re-arranging an array of words

498 byte By MrPeanuta at 2007-10-3 1:14:08
Hi, I have a large array of over 5000 words. I need to take all these words and re list them by groups--e.g. have words like 'fire', 'flame', 'burn' and 'combustible' listed next to each other.Is there a thesaurus I can use to perform this operation? I would like to be able to use the ...

Gold auto generation

390 byte By royzoa at 2007-10-3 1:14:48
Hi all,Currently i am buliding a Java MPOG War games. This game is a real-time based games. But i am facing difficulty in auto-gold generation part.Can someone enlighten me?My requirement is to add 500gold for every 30mins stay login in the games....i tried many ways but it seem not able to ...

Agregession Vs Comosition.

892 byte By rajpuniaa at 2007-10-3 1:18:10
Hi Folks......There Are two ways of Creating of class NPSHistory 1>By calling the Constructor of Another class2> By Calling the MethodHere We are Importing the Class NPSHistoryWhich is the Correct Way for Agregestion and Composition/////Case 1 For Composition////////public ...

Basic understanding of DAO pattern

1794 byte By jds@ku.edua at 2007-10-3 1:21:22
I'm starting to think (based on my confusion trying to implement the DAO pattern and some responses to another forum topic I posted) that I don't fully understand the DAO pattern. (This doesn't really surprise me).If I have a data model class, for example Shape, would I...A. write a DAO ...

duplicating images

527 byte By ptom98a at 2007-10-3 1:24:06
ive a question that i feel a bit silly asking cos i know i should know how to do it.is there an easy way of duplicating an Image that has been loading from my web server?Im guessing i can't use some thing like ;Image newImage=oldImage;although i havejt tested it yet i think it would try and ...

long to int problem

274 byte By HelloTamilaa at 2007-10-3 1:26:06
Hiwhat is the difference between (int)alongValueand(int)( alongValue ^ (alongValue >>> 32)I got confused with the use of ^ and >>> operator while going thru this link http://www.javapractices.com/Topic28.cjp

Genetic Algorithm Syntax

461 byte By jon.dmml@gmail.coma at 2007-10-3 1:27:21
I currently have a program that takes two integers as parameters. It either returns a win or a loss (the program is a game). Would it be possible to use statistics or a genertic algorithm to come up with the best two integers to pass to the program (by running the program thousands of times)? I ...

Function to drawing Arc in Java

995 byte By JImmiThinga at 2007-10-3 1:27:32
Hello Everybody!! I have already posted this on the "Jave Programming" forum but this place might be more helpful. I am working on a diagram editor and what I want to do is to allow the user to connect pairs of objects using arcs. ( see this picture ...

Best way to implement a word frequency counter (input => textfile)?

1182 byte By lapcherna at 2007-10-3 1:28:32
i had this for an interview question and basically came up with the solution where you use a hash table...//create hash table//bufferedreader//read file in,//for each word encountered, create an object that has (String word, int count) and push into hash table//then loop and read out all the ...

Java Gran Prix available?

108 byte By gameDevBobEa at 2007-10-3 1:31:10
Anyone know if Java Gran Prix is available to us? If so, how do we access it?Thanks,Bob

DAOs for classes that implement a common interface?

1591 byte By jds@ku.edua at 2007-10-3 1:31:15
If I have two classes X & Y and a common interface Nameable as followspublic interface Nameable{ public String getName(); public void setName(String name);}public class X implements Nameable{ private String name; private String someString;}public class Y implements Nameable{ private String ...

Singleton question

949 byte By amjavadeva at 2007-10-3 1:35:11
I have an existing object DataManager that gets passed to many other classes' constructors because those classes need a reference to this object. Now, understand that I never need to instantiate more than 1 object of type DataManager during a run of the system. So, I'm thinking that ...

paint map areas of real map and make distinction

443 byte By Coenosiaa at 2007-10-3 1:36:13
Hi,I want to make an area of a map from a JPG (see url for example): http://www.meccg.net/netherlands/meccg/downloads/promomap.jpgNow, I want the application I am building to be able to unravel in regions and break down the map regions into separate parts.The application needs to know when the ...

Buffering using Array and reading parts of it.

543 byte By mihailmileva at 2007-10-3 1:37:36
Hi,Excuse me, but I wasn't able to form the subject of the title very good. Now I will explain you the problem better: I have a file splitted in many parts (for example 100). In order to join this file I have to read all the parts, one by one, and update an array, to which every part is added. ...

Enemy Behaviour

6818 byte By Dash161a at 2007-10-3 1:37:53
I am currently programming a 2D platform game (like super mario bros). But i am having problems with the enemies. So far i have been able to put an enemy in the game but i can't get it to move.Enemy classpublic class Enemy extends GameComponet //class attributes{private final int walk_x_speed ...

Is this an instance of the Observer pattern ?

3318 byte By sumabhata at 2007-10-3 1:38:50
Hi,I am very new the Design Patterns way of thinking about architectures.This is for a school project, for my Designing with Design Patterns classand we use the Gang Of Four book as the text.The posting is a bit lengthy, please bear with me.I am given the design (a Rational rose mdl) for an ...

Get the Length of a mp3 file

325 byte By mihailmileva at 2007-10-3 1:39:47
OK, me again. Could someone help me with an algorithm to get the length (in seconds) of a mp3 file, or an already created library. I know an algorithm like this one:(song_bytes*8)/(bit_rate)*1024 . The problem is, that it only works if it's encoded with LAME, and with other shows different ...

puyo puyo game

172 byte By himacherlaa at 2007-10-3 1:46:41
hi this is murali krishna. I want source code for the puyo puyo game in java . I want to submitt as an assignment. please send me the code as soon as possible

Is this MVC?

1073 byte By sandsatera at 2007-10-3 1:48:48
I just finished reading Head First Design Patterns, which learned me a lot of stuff. But after reading the chapter about MVC I got a bit confused. I thought I was making my programs MVC (at least tried to) but now I am wondering. I take a small example.I have a simple UI with a button and a ...

Sun Transfer Object Pattern renamed?

506 byte By _dnoyeBa at 2007-10-3 1:49:12
If you see the pattern here which Sun is calling TransferObject pattern http://java.sun.com/blueprints/corej2eepatterns/Patterns/TransferObject.htmlIt seems as if that is a name change and the original name was ValueObject. All the pictures contain the name ValueObject. Furthermore the DAO ...

Efficient data structure to implement simple text editor?

2414 byte By lapcherna at 2007-10-3 1:50:22
I was given this problem in an interview:What data structure would you use to implement a simple text editor that does these 4 functions:a) goto(line number)b) insert(char input,location)c) delete(location)d) printAll() //print entire fileGiven that i'm such a newb, i was stumped. I came up ...

Removing Cycles from Graphs

321 byte By sergio06a at 2007-10-3 1:55:15
Hello,is anyone familiar with the problem of removing cycles from a directed graph G? I would like to form a DAG G' where all possible paths that are present in G are still present in G', except that these paths don't have to be infinite (the cycles can be traversed only ...

How to write it in Java?

399 byte By patucosa at 2007-10-3 1:58:24
Hi everyone in the forum,i gotta translate this matehmatical expressions into java but no idea how. Any suggestion? :freq_um[getPositionFromString(value)] = 1.0D4/(FREQ(I)/1.0D6/29979.2458);freq_mixt[getPositionFromString(value)] = 1.0D4/(FREQ(I)/1.0D6/29979.2458);I mean the arithmetic ...

Difference between Session Facade and Business Delegate design patterns

103 byte By raja2006a at 2007-10-3 1:59:00
Can someone tell me the differences between Session Facade and Business Delegate design patterns