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.
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.
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.
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.
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?
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.
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.
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.