If you ask me what is my date of birth? I say, my date of birth...
No answer yet for this question.
Ask a Tutor
Question:
Transcribed Image Text:
If you ask me what is my date of birth? I say, my date of birth is 87752886. Huh!!! What is that? If you sit down peacefully, you probably will say 87 is the day, 75 is the month, and 2886 definitely is the year. Question arises, how to relate these integers to the day, the month and the year? Give a nonnegative integer n less than 10000, we can say n is a "4digit" integer. What happens if n is a 3digit or 2digit or even a single digit? Well, you can assume that some leading zero(s) are implicitly defined for these integers, for example, if n = 78, implicitly n = 0078. In the study of Cryptography, may be one of your future subjects, we use the terms encryption and decryption. Here is how I encrypt a 4digits integer: (a) Add 7 to each of the digits and modulus the sum by 10 (b) Swap the 1" and the 3 digits; the 2" and the 4 digits (c) Form the new integer abcd where a is the 1" digit, b the 2 digit and etc. Some of the digits may be zero(s). To decrypt (recover back) the encrypted integer: (a) Add 3 to each of the digits and modulus the sum by 10 (b) As above for the swapping (e) As above in forming the new integer. Write a Java program to implement the encryption and the decryption. The following shows the interactions and the displays: Enter 4 digits integer to be encrypted: 9835 Encrypted integer is 0265 Enter 4 digits integer to be decrypted: 0265 Decrypted integer is 9835 During the demo, tell me what my date of birth is and assume that I didn't tell he
Expert Answer:
Related Book For
Posted Date:
Students also viewed these programming questions

Is Jo Goodwin Parker's Essay Effective or Ineffective? The answer to this question above (effective or ineffective) will be your thesis. What is Poverty? Jo Goodwin Parker (1971) You ask me what is...

Planning is one of the most important management functions in any business. A front office managers first step in planning should involve determine the departments goals. Planning also includes...

Marcia Stubern is planning for her golden years. She will retire in 20 years at which time she plans to begin withdrawing 60,000 annually. She is expected to live for 20 years following her...

Explain some of the possible causes of direct labor rate (price) and direct labor efficiency (quantity) variances. Who normally has responsibility for or influence over these variances?

(a) Write each vector in Fig. 1.37 in terms of the unit vectors I and j. (b) Use unit vectors to express the vector C, where C = 3.0M  4.00B. (c) Find the magnitude and direction of C. A (3.60 m)...

Implement the state machine diagram derived in Problem 640 by using a Graycode state assignment. Problem 640 Find the state machine diagram for a circuit that detects a difference in value in an...

The beta coefficient for Stock C is bC = 0.4 and that for Stock D is bD = 0.5. (Stock Ds beta is negative, indicating that its rate of return rises whenever returns on most other stocks fall. There...

Take some time to think about the skills you've learned in English How do the reading skills you've learned in English make you a better writer and media creator? How did completing writing tasks...

Most tax practitioners will tell their clients not to contribute appreciated property into their C corporation because even though it can go into the corporation taxfree under Section 351, it will...

Unifor, the Canadian union, has reached tentative agreements with Fiat Chrysler and Ford this year. Identify two potential ethical dilemmas or sources of conflict that could develop between Unifor...

Write a Matlab code to create hybrid images using Lowpass, highpass filtering of FFT. 1. Collect a few pairs of images (5 pairs = 10 images related to Qatar or QU) that you want to make into hybrid...

A stepin viewing window having the shape of a halfcylinder is built into the side of a large aquarium (see the figure below). The hydrostatic forces on the window must be determined to select...

Siya leases an apartment to Richard, in a block of flats, for R 8000 (eight thousand rand) a month. Richard moves into the apartments and proceeds to run a gym from the premises. Running a business...

An enthusiastic project team has been created to implement the design for a piece of equipment with a specific function as part of machinery being manufactured for a client. One team member has...

On December 1 of the current year Taxpayer sold 1000 shares of X Corporation stock for $50,000. She had purchased the stock exactly two years earlier for $60,000. On December 15, of the current year...

As an option trader you decide to sell a straddle by selling a put option and a call option on the same stock. The put option has a strike price of K1 = $50 and is priced for P = $5, and the call...

Given find the value of k. es 1 e kx dx = 1 4'

1. Don't require Spitzer "connectors" to reveal their affiliation with the corporate wordofmouth marketing campaign. They don't have to recommend a product they don't believe in. 2. Require that...

What are the major differences between manufacturing and service organizations? Give examples of how each type might benefit from using Web 2.0 tools such as micro blogging and social networks.

In September 2013, Tokyo Electric Power Company (Tepco) reported highly contaminated water leaking from a storage tank at the Fukushima nuclear power plant crippled in a March 2011 earthquake and...

A fastball thrown by a professional baseball pitcher travels at about 100 mph. How does the kinetic energy of the baseball thrown at this speed compare to cosmic radiation at 15 MeV? (The mass of a...

The halflife of carbon14, used in radiocarbon dating, is 5730 years. What is the decay constant for carbon14? Strategy The halflife and the decay constant are alternative ways of characterizing...

A button case for a small battery must be silver plated. The button is a perfect cylinder with a radius of 3.0 mm and a height of 2.0 mm. For simplicity, assume that the silver solution used for...
Question Categories