Results 1 to 2 of 2

Thread: "A Simple Task"

  1. #1
    Castor is offline Archpope
    Join Date
    Nov 2011
    Location
    Sweden
    Posts
    1
    Rep Power
    0

    Default "A Simple Task"

    Hello!

    This week, in my programming-class, we got a new assignment. It's all probably very, very basic, but this is our first programming-class, so our skills are slightly rudimentary, but it is still too much to manage on our own. However, this wouldn't be a real problem, since it is a course where we are supposed to learn all this. BUT, to actually achieve higher grades, we are not allowed to ask our teacher for help or guidance. (which to me sounds completely insane, but there it is.) So, here I am, instead asking around on a forum. Of course, this is all concerning Java-programming.

    Our assignment is as follows:

    Simple Texteditor in Java

    Your ask is to create a simple "singe-line texteditor". You may choose if the user should be asked for a file to be edited, or if you use a specifik filename in the code. The full content of the file shall be shown and then the user gets to input one, or several lines that will be added to the end of the file.

    Hint: You will need to learn how to read and write text in files, in Java.

    Suggestions on improvement:

    • Ask the user for a filename in an ordinary input dialog, command line arguent, or a file requester.
    • The possibiity for the user to, in some way, add and/or switch text anywhere in the file.
    • GUI - program this to work wit ha GUI, more complicated, but more comprehensible and more appealing.


    Note! Comment on the code often, so it is obvious that you understand the code.

    That's it!

    Of course, it is not my intention that I want someone to do all this for me. It is just that I could need some help or guidance with it, maybe talk through some ideas or similar.

    So far, I've understood that we're supposed to use the input/output command, but other then that, well...
    Alright, that's about it, thanks for your time, and I hope I can get some help with this!

  2. #2
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,529
    Blog Entries
    7
    Rep Power
    20

    Default Re: "A Simple Task"

    If I were you I'd use a JTextArea for the purpose; read the API documentation for that class and you know all.

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

Similar Threads

  1. Simple Swing throws Exception in thread "AWT-EventQueue-0"
    By sultanofswing in forum AWT / Swing
    Replies: 3
    Last Post: 10-29-2010, 09:20 PM
  2. Simple "if" statement problem....compiling error.
    By CYANiDE in forum New To Java
    Replies: 4
    Last Post: 10-14-2009, 09:56 PM
  3. Convert " ü " into simple " u "
    By nitinb4u in forum New To Java
    Replies: 4
    Last Post: 02-23-2009, 08:35 AM
  4. Replies: 2
    Last Post: 01-24-2009, 06:56 PM
  5. Replies: 1
    Last Post: 10-20-2008, 07:35 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •