Write a program to implement a static method

Assignment Help Computer Engineering
Reference no: EM132128952

Secret Channels

A company uses public Internet to carry its phone service. The voice data will be encrypted before sending to Internet. The encryption algorithm is as follows:

For each four-digit decimal integer,

(1) Add 5 to each digit, divide the sum by 10 and use the remainder to replace the digit,

(2) Swap 1st-digit with 4th-digit,

(3) Swap 2nd-digit with 3rd-digit.

For this assignment, write a program named Encrypted.java to perform the following tasks:

1. Implement a static method as specified below: public static int encrypt(int data) - this method takes voice data and return encrypted data by applying the encryption algorithm

2. Implement the main method, which reads data from the provided data file, then use the encrypt method to encrypt the voice data and print the encrypted voice data.

Input: A series of lines. Each line is a positive four-digit decimal integer.

Output: In each line, print the encrypted four-digit decimal integer.

Reference no: EM132128952

Questions Cloud

Summarize your plan in a two to three paragraph post : Apple is about to release its latest technology. The company needs to develop a plan to communicate with key stakeholders about the release.
How you personally experience those controls in use : Pick two of them and describe how you personally experience those controls in use on personal, work, or school computer systems.
Analyze the need for an information technology management : Analyze the need for an information technology management plan for natural disasters and security breaches.
Prepare a performance evaluation video presentation : MBA641 - Strategic Project Management - Performance Evaluation Video Presentation - read a case study based on a fictional company and prepare a Performance
Write a program to implement a static method : A company uses public Internet to carry its phone service. The voice data will be encrypted before sending to Internet.
Evolution of decision support systems : Conduct some research and provide an example of a Decision Support System for each category.
What are the motivations of the ethical hacker : Discuss the pros and cons of an organization regularly engaging in penetration testing.
Write the name of the type of each data structure : Select an appropriate data structure for each problem below. For each, write the name of the type of each data structure (queue, for example).
Design a tester class called amusementparktester : Display a short menu that allows a user to perform different actions in the gift shop such as looking up tickets or merchandise or purchasing items.

Reviews

Write a Review

Computer Engineering Questions & Answers

  Determine postal cost of parcel by searching weight fields

You can then determine the postal cost of each parcel by searching the Weight fields and then using the Cost field.

  Design an fir linear-phase filter

Use MATLAB to design an FIR linear-phase filter that models a low pass band limited channel that has a 1/2 -dB ripple in the pass band I ƒ I = 3000 Hz.

  How you will preserve information for forensic analysis

Describe how you will preserve information for forensic analysis. Identify digital evidence controls that are in place for your network.

  Examine the physical data model that you created

Examine the physical data model that you created in question F. Develop a clustering and indexing strategy for this model. Describe how your strategy will improve the performance of the database.

  Design and develop a small prototype website

You are asked to design and develop a small prototype website for the client organisation in the scenario below

  When you first receive an rfp what three parts should you

question 1.when you first receive an rfp what three sections should you look at to determine if your firm is going to

  Write a regular expression describing l

Write a regular expression describing L. Prove the correctness of your construction.

  Evaluate each point to determine the most important three

Imagine only three points are to be rolled out in the first phase. Evaluate each point to determine the most important three for the initial rollout phase.

  Why relational database was the best choice

create a relational database containing information about music performers, their recordings, and the composers of the music they recorded.

  Build a simple shipping company web application

Who can build a simple SHIPPING COMPANY web application with DATABASE that will be easy to host online. With just few pages but with all necessary functions.

  Create paraphrased versions of the given passages

Using what you learned about paraphrasing this week, create paraphrased versions of the following passages. The original passages define the terms ethics.

  Uses and developing the class diagram

Choose one of the uses and develop a class diagram. Generate a sequence diagram for use case that you had selected.

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