David Patrzeba

Greenhorn
+ Follow
since Jun 08, 2010
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
1
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 David Patrzeba

Alright, so I finished Head First Java, I am currently reading an SCJP book, I have built a recipe and budget tracking applications without a GUI, I am looking into learning the SWT framework or the GTK bindings to do GUI work. So my question is, where do I go next, I feel like books like effective java are still out of my scope but I don't really see a book that connects me there. At this point should I be reading books on more specific topics ie. generics, collections, concurrency...etc, or is there a book that I am missing.

Thanks
Dave
13 years ago
Did you compile BeerSong.java.

It looks like you built the java documents.

You need to use the command javac BeerSong.java
13 years ago
The flaw is that as you pass in 2 and take one down the program out puts:



The solution is to rearrange the code so that the qualifier is after you remove the bottle.
13 years ago
Is this a good way of creating the window or is there a different design I should try. I like breaking everything up for organization but that means that I need to create all the containers as static variables.




13 years ago
I'm currently creating a class to handle menu options. So far I am able to create menu's with options ie:


And I have written the code in order to output the options so it looks like this:


So here is where I don't know if there is better method to implement what I want to do next, but essentially right now I take the user input and then I use a switch and case in a HandleMenu file. I don't think this is the best solution because it implies that I have knowledge of all the menu options.

I want to somehow include the method call in the Menu class so it would look something like this:


Does anyone have an idea on how I would implement this; I hope I was clear.

13 years ago
First of all you should really use the code tags. You can use them by typing them:

[code]
Your code here
[/code]

Or by highlighting your code and then pressing the code button at the top of the message body page.

Second of all obs[x] is an index position in an array of type Puzzle4b. The class Puzzle4b has a method called doStuff(int factor) that takes an int that is called factor.

So when the program calls obs[x].doStuff(x) what it is doing is taking the object located in the Array obs at index x and executing that objects method doStuff which takes an int argument. The int argument that you are choosing to send to it is x.

So now the variable factor is equal to x when the program enters the method doStuff.
13 years ago
Your call is:



however in the GameHelper class you define that function as:



Look at the "i's" i != I.
13 years ago
Good to know, I'll avoid giving out direct answers like that in the future.
13 years ago
Thanks for all the tips.

I agree with using a format that is supported and I am fine with that, the biggest thing for me would be the encryption which I believe java has built in. Right now the encryption isn't a huge deal because my current program doesn't need it, but my next project will.

Right now what I'm trying to learn is kind of like the best practices for saving files, and how to create unique extensions. It has nothing to do with me wanting to make a proprietary extension but rather would like to see how it is implemented and used. The other big thing is preventing my user from directly modifying their save files in a text editor and then corrupting there data, how do I work around that, do I just assume that my users won't open the file in Vi or notepad and mess with it?

13 years ago
OK,

So right now I am writing a desktop application. Now I want to give my files their own extension and I want to make sure that the files can not be accessed except through the client program. If you can just point me at a library or tutorial that describes how to do this that would be great.

-dlp
13 years ago
Oh wow....yea way wrong...i'll fix that right now. I really shouldn't post when I'm tired
13 years ago
Your welcome.

Obviously this is the simple answer which you can improve by adding a while loop around the statement that allows the user to retry his input if he fails the evaluation.
13 years ago
13 years ago
Hey all,

This is my first post, so I am going to do my best to make sure everything is right before this posts, but if I miss something please let me know so I can fix it (I know you guys will).

Anyway, I was wondering how most people have their programs save their files. Do they use DB, XML, JSON, regular text file. Also what makes you decide what method to use, in other words can someone give me a few test cases for each use.

-David Patrzeba
13 years ago