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

  Imagine you are the project manager for a critical project

imagine you are the project manager for a critical project for an organization. the organization wants to implement an

  Create a class encapsulating a grocery store

Create a class encapsulating a Grocery store,which inherits from Store. Store has the following attributes: name and sales tax rate.

  Estimate speedup obtain by using floating-point coprocessor

Select a processor family you have access to and estimate the speedup obtained by using a floating-point coprocessor in the system.

  Compute the hash value of the character string

How can we apply the division method to compute the hash value of the character string without using more than a constant number of words of storage outside.

  Find a minimum weight spanning tree of the graph

Find a minimum weight spanning tree of the graph in Fig. using the Prim-Dijkstra and the Kruskal algorithms.

  Make a class named order that performs order processing

build 4 Order class fields: order number, customer name, quantity ordered, and total price. Create public accessors for each field except total price.

  How does the given situation serve as an analogy

Suppose there is a small commercial retail building in town. How does this situation serve as an analogy for the concept of IP addresses with TCP port numbers?

  Write down a program that has a function named presentvalue

Write down a program that has a function named presentValue

  Write a static web page that includes the basic structure

Write a static Web page that includes the basic structure of a valid HTML (not XHTML) document. Make sure to include the language attribute of the html element.

  Explain the coding scheme used for encoding arabic alphabets

Explain the coding scheme used for encoding Arabic alphabets in the computer. Explain what it means that bitmapped image is device-dependent.

  Fnd out two blogs which describe web site design trends

question 1 find two blogs that discuss web site design trends. on each site find blog entries on a specific

  Who are the influential users in each of the two samples

Who are the influential users in each of the two samples? Compare the list of influential users in the two samples to detect loyal users.

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