If you ask me what is my date of birth? I say, my date of birth...
Fantastic news! We've Found the answer you've been seeking!
Question:
![](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2023/09/65014b246f49c_1694583581315.jpg)
Transcribed Image Text:
If you ask me what is my date of birth? I say, my date of birth is 87-75-2886. 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 non-negative integer n less than 10000, we can say n is a "4-digit" integer. What happens if n is a 3-digit or 2-digit 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 4-digits 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 If you ask me what is my date of birth? I say, my date of birth is 87-75-2886. 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 non-negative integer n less than 10000, we can say n is a "4-digit" integer. What happens if n is a 3-digit or 2-digit 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 4-digits 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
-
What percentage of the American opportunity tax credit may be refundable?
-
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...
-
Determine the global extreme values of the function on the given domain. f(x, y) = 5x- 3y, y x-2, yz-x-2, y 3
-
Why is time almost always a dimension in a data warehouse or data mart?
-
A roast at a temperature of 40F is put in a 300F oven. After 1 hour the roast has reached a temperature of 150F. Newtons law of cooling states that where T is the temperature of an object, the...
-
10. How does the purchase of an interest from existing partners differ from the acquisition of an interest by investment in a partnership?
-
Do Brands Have Finite Lives? Often, after a brand begins to slip in the marketplace or disappears altogether, commentators observe, All brands have their day, implying brands have a finite life and...
-
Weygande adice Assignment Gradebook Downloadable eTextbook ORION Exercise 14-01 a (Video) Your answer is partially correct. Try again. On January 1, Sandhill Corporation had 90,000 shares of no-par...
-
1. Display the age and name for the pilot who was the oldest when HIRED. 2. Using a SET OPERATOR, display the pilots and the number of miles flown as "Miles Flown", include pilots who have not yet...
-
Need to work on a Crisis Communication report. You have been hired to determine whether a communications team was successful in addressing and handling a crisis. Your duty is to study how the...
-
Which one of the following therapists' approaches has been integrated into several other therapies in the West? 1. Naikan therapy 2. Morita therapy 3. mindfulness meditation
-
What does this scatter plot tell us? Check ALL below that are true from the Scatter Plot. Y is cumulative total barrels and x is number of active wells. 1. If there were 550 active wells, we would...
-
Millie runs a small company that makes customised notebooks with personalised details on the cover and inserts. You promote your product as a great gift idea, and your holiday orders break your...
-
Excel ACC 311 Project Two Workbook Template - View-only Search (Alt + Q) File Home Insert Draw Page Layout Formulas Data Review View Help 12 B A ... ab Ev F10 1 2 3 4 5 6 fx A B Posey's Pet Emporium...
-
Imagine that you are the change manager for acompany that does business entirely via the Internet. The head development engineercalls to indicate he wants to make a small change to one of the...
-
question 7. which risk factor is of more concern to insurance companies in determinating to continue insurance coverage? Question Completion Status: Standard and Poors Morningstar Moody's Weiss None...
-
Making use of the tables of atomic masses, find the velocity with which the products of the reaction B10 (n, ) Li7 come apart; the reaction proceeds via interaction of very slow neutrons with...
-
1. Don't require Spitzer "connectors" to reveal their affiliation with the corporate word-of-mouth 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...
-
David Rose is puzzled. His company had a price-earnings ratio of 25 in 2004. He feels that this is an indication that the company is doing well. Julie Bast, his accountant, says that more information...
-
Which ratio or ratios from this chapter do you think should be of greatest interest to: (a) a pension fund considering investing in a corpo- ration's 20-year bonds? (b) a bank contemplating a...
-
Name ratios useful in assessing (a) li- quidity, (b) solvency, and (c) profitability. AppendixLO1
![Mobile App Logo](https://dsd5zvtm8ll6.cloudfront.net/includes/images/mobile/finalLogo.png)
Study smarter with the SolutionInn App