Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 3 of 3

Thread: Need help with assignment (File Input and Ouput, Encoder)

  1. #1
    Junior Member
    Join Date
    Mar 2012
    Posts
    3
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default Need help with assignment (File Input and Ouput, Encoder)

    Create an encode/decode program. This program will have two methods (or two classes) that use the FileWriter/FileReader and BufferedWriter/BufferedReader. The first class/method will write an encoded message to an output file call “codedmessage.txt”, e.g., you could shift the letters of the alphabet by one [hello=ifmmp]. The encoded massage should be a least ONE SENTENCE in length (minimum of 50 characters). The second class/method will read in the contents of the encode file and decode the encoded message.

    Proposed marking scheme:
    • Use of FileWriter and BufferedWriter to output file [10 marks]
    • Simple encryption applied to text before writing [10 marks]
    • Read in file using FileReader and BufferedReader [10 marks]
    • Use of methods and/or separate classes for I/O [10 marks]
    This is our question, only problem is I have been away on holidays the last two weeks and got caught behind on my java and I havn't even started on these file writer/filereader imports and don't really know what I'm doing here, tried reading the college notes but I got even more confused, if anyone can explain how I can get started on this would be very appreciated


  2. #2
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    21,942
    Thanks
    56
    Thanked 2,353 Times in 2,324 Posts

    Default Re: Need help with assignment (File Input and Ouput, Encoder)

    It looks like there are two things you need to do:
    Write and read a file.
    encode and decode a String

    Work on each part separately and then merge the code.

    What questions or problems are you having with these?
    If you don't understand my answer, don't ignore it, ask a question.

  3. #3
    Forum VIP
    Join Date
    Jul 2010
    Posts
    1,699
    Thanks
    25
    Thanked 334 Times in 310 Posts

    Default Re: Need help with assignment (File Input and Ouput, Encoder)

    As a helpful reference to you, here are some links to the APIs your project mentions:
    FileWriter
    BufferedWriter
    FileReader
    BufferedReader

    And just in case, here is the String API: String (Java Platform SE 6)
    NOTE TO NEW PEOPLE LOOKING FOR HELP ON FORUM:

    When asking for help, please follow these guidelines to receive better and more prompt help:
    1. Put your code in Java Tags. To do this, put [highlight=java] before your code and [/highlight] after your code.
    2. Give full details of errors and provide us with as much information about the situation as possible.
    3. Give us an example of what the output should look like when done correctly.

    Join the Airline Management Simulation Game to manage your own airline against other users in a virtual recreation of the United States Airline Industry. For more details, visit: http://airlinegame.orgfree.com/

Similar Threads

  1. Trouble wil XML Encoder/Decoder using linkedlist<parameter>
    By javanoobb in forum What's Wrong With My Code?
    Replies: 0
    Last Post: October 15th, 2011, 06:59 PM
  2. how to get value path file from jsp form- input type file
    By meeGoreng in forum JavaServer Pages: JSP & JSTL
    Replies: 4
    Last Post: October 4th, 2011, 01:05 AM
  3. Recursion ouput is not coming for value more than 40.
    By Revati in forum Algorithms & Recursion
    Replies: 12
    Last Post: July 7th, 2011, 07:49 PM
  4. [SOLVED] Encoder output error heed help
    By SHStudent21 in forum What's Wrong With My Code?
    Replies: 0
    Last Post: January 14th, 2011, 06:47 PM
  5. Replies: 8
    Last Post: January 6th, 2010, 09:59 AM