Ok i relatively new to java and i seem fine with the theory of how a program could work but i lack in the actual coding department.That said i have an idea for a simple text based chat input/output program (probably nothing original but oh well).
I was wondering if i was to explain the theory in the idea and how certain parts would work with different methods (one or two things i still don't quite get but i'm sure the clever people on hear would know) Then someone could put the theory into action and show me the code so i can understand how it would all fit together and work so that i can learn a bit more Java.
So the idea, as i said its a text based GUi input/output interface consisting of 2-3 panels ontop of each other(North,center,south).
The first (North) would just be a sill image acting as the programs profile picture (for lack of a better word)-its worth noteing that im not sure if this is possible in java, please let me know.
The second/third (Center/South) would be the chat.Where you input the text and where it shows the output text. The idea behind this would be an "if else" inside of a "do while" loop e.g. do-ask for input, while- input is not "quit". So that when the user inputs quit they exit the program.
As for the input/output, this is where the "if else" comes in, each "if" will have a different bit of text so if "input" matches the text then output "reply" e.g. input=hello output = hello, how are you? etc. "else" could be something like "unknown statment" etc.
This is the second/third because in the interface im not sure if there should be a different panel for the input and the chat history or if it would be better to put them together so you just type underneath the most recent reply.
I think the sums it up, let me know if something doesn't make sense or anything like that.
Many thanks
No comments:
Post a Comment