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

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

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