Write a program to read a file and encode

Assignment Help JAVA Programming
Reference no: EM13164624

Problem Description:

Suppose an encrypted file was created using the encoding/decoding scheme . Each letter is substituted by some other letter according to a given mapping as shown below.

String letters = "abcdefghijklmnopqrstuvwxyz";

String enc = "kngcadsxbvfhjtiumylzqropwe";

For example, every 'a' becomes a 'k' when encoding a text, and every 'k' becomes an 'a' when decoding. You will write a program, encode or decode a File, and then encodes or decodes the File using the mapping above. Capital letters are mapped the same way as the lower case letters above, but remain capitalized. For example, every 'A' becomes 'K' when encoding a file, and every 'K' becomes an 'A' when decoding. Numbers and other characters are not encoded and remain the same.

Write a program to read a file and encode the file to an encrypted file. And write a program to get an encrypted file and decode to original file. Your program should prompt the user to enter an input file name and an output file name

What should you do?

  1. Ask for input file name/ output file name (encrypted file). The encrypt using above encode/decode.
  2. Ask for encrypted file and decoded to original input file.

Reference no: EM13164624

Questions Cloud

A robot can take steps of 1 meter : A robot can take steps of 1 meter, 2 meters, or 3 meters. Write a recursive function to calculate the number of ways the robot can walk n meters. (n is an integer obtained from user.) As example:
Code works and does what it is suppose to do : Please make sure the code works and does what it is suppose to do. I keep getting answers on my other assignments that were copy and pasted from god knows where and had nothing to do with the assignment instructions.
If there are 4 command line arguments : If there are 4 command line arguments (a b c filename.dat) then the engine should take a,b,c and store the resulting x1 and x2 in filename.dat working in silent mode (no use of screen)
The factorial of a positive integer n, denoted by n! : Write a program that computes the sequence of factorial values: 1! = 1, 2! = 2, 3! = 6, 4! = 24, 5! = 120, 6! = 720, ....
Write a program to read a file and encode : Write a program to read a file and encode the file to an encrypted file. And write a program to get an encrypted file and decode to original file. Your program should prompt the user to enter an input file name and an output file name
Class polygon which draws a hexagon for a set of numbers : Write a class Polygon which draws a hexagon for a set of numbers given by the user. You must only use method drawLine of class Graphics (other fill or draw methods won't be accepted).
Using wireshark note the ip address and tcp port number : Using wireshark note the IP address and TCP port number used by your client computer (source) to transfer the file to any FTP server?
Ask the user to enter a positive non-zero integer value. : Write a program which aske the user to Enter a positve non-zero integer value. if the value enterd zero or negative print as error message and end the program; otherwise, use the integer to call a method displayPattern(n) which must display the follo..
Class named person with fields for holding a person''s name : Design a class named Person with fields for holding a person's name, address, and telephone number. Write one or more constructors and the appropriate mutator and accessor methods for the class's fields.

Reviews

Write a Review

JAVA Programming Questions & Answers

  Executing stringed musical instrument class

Create and execute a stringed musical instrument class.

  Write various bindings to determine semantics

Write the various bindings that are required to determine the semantics when statement is executed. For each binding, indicate binding time used for language. Describe your answer.

  Create a secure parts inventory catalog system

You will create a secure Parts Inventory Catalog system using Model 2 architecture. The application will require a user to have the proper access right to enter the system, and when satisfied, presents the catalog of items currently available in t..

  Write down the java code for the bank

Write down the java code for the bank of Fraud. User is presented with menu which looks something like this: 1. Deposit 2. Withdrawal 3. Check Balance 4. Exit.

  Java program that will add the corresponding elements

Develop a Java program that will add the corresponding elements of two 1-dimensional arrays X and Y to produce the 1-dimensional array Z. Arrays X, Y, Z have the same dimension [M].

  Modify the scholarship application

Modify the Scholarship application so that if a user enters a grade point average under 0 or over 4.0, or a negative value for either of the activities, an error message appears.

  Design a class named large integers

Design a class named largeIntegers such that an object of this class can store an integer of any number of digits.

  Design a single class that expresses the commonality

Design a single class that expresses the commonality of these concepts.

  Bilinear and nearest neighbour algorithm in java

How to do bilinear and nearest neighbour algorithm in java. Show how to eliminate change in pixel aspect ratio in java.

  Write a java binary search tree program

write a JAVA binary search tree program

  Write a java program using the java graphics

Your task for this assignment is to write a Java program using the Java Graphics class to create an example of a computer generated image. This is an opportunity for you to explore computer graphics and exercise some individual creativity.

  Class diagram represents the relationship between parents

Draw a class diagram that represents the relationship between parents, children, and grandparents. Take into account that a person can have both a parent and a child. Annotate associations with roles and multiplicities.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd