B West

Greenhorn
+ Follow
since Oct 10, 2008
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by B West

Thank you for your reply... For an issue like this, (I'm assuming it's a common issue...) Would this suggestion/method be a common practice... It sounds like a nice solution, but I'm trying to stay close to good design principles...
14 years ago
Hello, I will try to keep this as simple as possible and try to describe my problem accurately. I have to 4 classes :

Two of them are depts and the other two are Actions... The idea is that each dept will utilize a particular action. (Some FileDeletion functionality...)

I thought interfaces would do the trick...




The dept classes came together very quickly. However, I've run into problems with my action classes and the implementation of the Action interface...

The problem I'm running into is that my two action objects can't implement the method the same. Each action class needs to supply the method different arguments to achieve the desired actions.

for instance:





Obviously, this design is flawed, an Interface in this situation appears to just not make any sense. Is there maybe a different approach I can use? To achieve the desired affect? I could code the two object classes implementing all the needed methods, but that doesn't feel like a good OO design. I feel like I'm missing something.

Any help would be appreciated!

Sorry for the length and and for my ignorance.


cheers,
14 years ago
Thank you all for your replies.

It's been very informative!

bw

14 years ago
Thanks for your reply. I couldn't agree more. I thought I understood things better, but this project challenged my ability to design a "complex" app.

Again, thanks for your reply!
bw
14 years ago
Hello, I have a question for the forum. I have recently worked on a program where I had quite a bit of trouble in the design aspect of the project. I ended up have to use a marker interface, which i my opinion was functional, but kind of a hack. My question to the board is where should I go to brush up on good java design principles? Would design patterns be appropriate in this sense?

Your thoughts and comments are welcome.

regards,

bw
14 years ago
Sorry for the delay, I appreciate your response.

Here is the setup method in my testClass.



The issue I constantly run into is the line: WebRequest request = new PostMethodWebRequest("http://localhost:8080/BooksSite/FormValidation"); keeps telling me that it is not a valid servlet. So I must be missing something, becuase i'm pretty sure that is the servlet url.

Not sure where to go from here.

I cannot do anything from this point, other testcases never get accessed because of this error!

Any suggestions?

Thanks for the reply!
bw
14 years ago
Hello, I'm new to Httpunit and I'm having an awful time getting the servlet started....

This is my error:



Here is my servlet code




And here is my web.xml in case it's a mapping issue....



I'm I being dense? I can't see any reason why this isn't working. I know there error is saying somthing about mapping. How is this mapping incorrect?

Any help is greatly appreciated!!

Regards,
bw
14 years ago
Thanks for the direction. I appreciate the help!

bw
14 years ago
Hello, I'm new to some of the servlet concepts, and I'm curious to know if it's possible to access a HTML Form by name. For instance.


Here is the form code on the Html page.


Is it possible to access to in the Servlet say something to the affect of:



I'm not sure if I'm way off base here, if I am, could somebody please give a shove in the correct direction.

Thanks!

Regards
bwest
14 years ago
Thank you all for your replies. I got it figured out. The assert statement was fine. I had something up stream that was cause my assert to be triggered.. So HA, score one for the debugging merits of assert!!

Thanks again to all that replied!
bw
14 years ago
I keep getting AssertionError on this statement, is there a way to do this?



Pardon my ignorance, as this is my first foray into assertions.

Any help appreciated!

Thanks
bw

14 years ago
So something like this would work...


15 years ago
Thank you all for your reply's:

I'm not trying to be dense, I'm just not sure how to describe this. The two documents would be similar to this...




The program in question would parse each file into it's own multidimensional String array.

I would like to take both of these Multidimensional String arrays and put them together into another multidimensional array.....


This would be the desired content of the "third multidimensional array....


The third array would be an "accumulation" of all the data from all the different arrays...

Is this a better explanation?

15 years ago
The intent behind the code is : I'm attempting to parse multiple csv files. The CSVParser in the program outputs the parse into a multidimensional String array. For each CSV file I process, I'd like to add the individual files into a Big One. Essentially, I need to add the contents of one Multidimensional Array to another.

I don't really have any data at this time to show you, It's more of a concept at this time. I just wanted to know if it was possible.

If I'm not being clear i apologize. I do appreciate your help.

Thank you!







15 years ago