Foursquare Cipher

OK, cheers I will try this out,

Thanks U,

That worked,

Of-course I had to make things hard for my-self by putting in a package when there was no need for one.

It is cool, I will try now for knowledge sake and add a menu and loop to this cipher code to give it a more user friendly touch to it.
Is there any need for static code to be introduced into the program for say menu option or IO option, which ever I choose haven’t made up my mind on that one yet ! Anyway I will see it should be easy enough to introduce these minor bits the hard work has being put together, java its a hard enough language to get your mind around.

It really just depends on what you think are best practices. I don’t really think Java’s IO or NIO packages are static based, so you’ll probably end up having to instantiate objects to implement that. Maybe if you use simple Swing package dialogs then the GUI (Graphical User Interface) could be made mostly static. I think JavaFX is best practice for now, but for some reason it’s being deprecated in future Java versions, so the most backward compatible, resilient, solution might just be Swing. Stackoverflow et. al. is your friend.

Hi
Orb, i tryed but to no avail to add a menu or some sort of input mechanism to this code for a user to enter the plaintext and keywords after compiling, instead of entering it at the command prompt as it was designed.
Could you write in the few lines of code that would be needed to make this a reality as an example
after compiling instead of entering plaintext and the keyword1 and keyword2 at compile time to have perhaps some kind of an input prompt instead for a user to communicate the plaintext and keyword arguments, what do i need to instantiate these type of objects for these arguments or maybe some kind of IO scanner class maybe, help !!

If you have the expertise it would be appreciated and educational.

I tried myself but failed, i am a basic java novist but learning a few tricks and enjoying it at the same time.
I dont seem to be able to instantiate objects if that is what is required to achieve my goal, they dont seem to be compatible with static based methods.

Try looking into simple menu dialog methods like JOptionPane.showInputDialog(). I found this neat Simple Dialog Tutorial online.

OK cheers I will , scanner is probably the way to go.