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 ...
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 ...
please could any one help me in findind source code in java for polyphase and balanced sortingthx for advance
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 ...
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 ...
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, ...
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.
Hi,How do I generate different cominations of a word.Eg: TestTESTTEst TESt TesT ...............Please let me know .Thanks,Sarayu.
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 ...
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
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
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 ...
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 ...
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.
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.
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 ...
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
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 ...
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
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 ...
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) ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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
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 ...
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 ...
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 ...
Anyone know if Java Gran Prix is available to us? If so, how do we access it?Thanks,Bob
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 ...
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 ...
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 ...
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. ...
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 ...
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 ...
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 ...
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
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 ...
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 ...
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 ...
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 ...
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 ...
Can someone tell me the differences between Session Facade and Business Delegate design patterns