Write a static method to convert a String into corresponding login password. Write a main( method...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Write a static method to convert a String into corresponding login password. Write a main( method that tests in another class named Password. This static method should use following rules for substituting letters or symbols with digits. If current character is a lowercase vowel, then replace with 3 and for an uppercase vowel replace with 5. Similarly, for lower consonants replace with 2 and for uppercase consonants replace with 4. If any special symbol is seen, then it must be replaced with its corresponding position (Consider that starting position is 0). Example: String GoOd82# will be converted to 4352826 Write a static method to convert a String into corresponding login password. Write a main( method that tests in another class named Password. This static method should use following rules for substituting letters or symbols with digits. If current character is a lowercase vowel, then replace with 3 and for an uppercase vowel replace with 5. Similarly, for lower consonants replace with 2 and for uppercase consonants replace with 4. If any special symbol is seen, then it must be replaced with its corresponding position (Consider that starting position is 0). Example: String GoOd82# will be converted to 4352826
Expert Answer:
Answer rating: 100% (QA)
The answer provided below has been developed in a clear step by step manner Step 1 As you have not m... View the full answer
Related Book For
Java An Introduction To Problem Solving And Programming
ISBN: 9780134462035
8th Edition
Authors: Walter Savitch
Posted Date:
Students also viewed these computer network questions
-
Every real number is either a/an number or a/an_______ number.
-
A carbon disulfide molecule belongs to the point group D_h. The nine displacements of the three atoms span A1g+ AIU+ A2g+ 2E1u+ E1g.What are the symmetries of the normal modes of vibration?
-
A hydraulic turbine-generator unit placed at the bottom of a 75-m-high dam accepts water at a rate of 1020 L/s and produces 630 kW of electricity. Determine (a) The overall efficiency of the...
-
Repeat the calculations of Example 6.3, but for \(80 \mathrm{~mol} \%\) of the liquid distilled. Data From Example 6.3:- Suppose the liquid of Example 6.1 [50 mol% n-heptane (A), 50 mol% n-octane...
-
Provide the missing data in the following table for a distributor of martial arts products: Division Alpha Bravo Charlie Sales $11,500,000 S ? $ 920,000 $210,000 Net operating income ? Average...
-
Write a Java program to Connect Java Application with Oracle database. Please, use the keyboard and support your answers with a screenshot
-
You, CPA, work as an associate with Campbell and Associates LLP, a financial and business advisory firm. The board of directors of Pembroke Pulp and Paper Inc. (PPPI) has engaged your firm once again...
-
A new law is enacted requiring exotic pet owners to obtain a licence to keep exotic pets. Failing to do so is a crime, punishable by fine and/or imprisonment. An agency is established to provide...
-
Greg Grove pays \(\$ 50,000\) interest in 2018 on his mortgage on his principal residence. It has an interest rate of 4 percent and balance of \(\$ 1,250,000\) during the year. He took out the...
-
Jim Junction purchased a building business on November 17,2017 , for \(\$ 400,000\). On July 21, 2018, he exchanged the building for another business building in a like-kind exchange. The new...
-
What is meant by cross-validation in a discriminant model? Why is it done and how does it work?
-
In 2018, Sally Morris, a single taxpayer, pays \(\$ 3,000\) of interest on qualified student loans. Her AGI is \(\$ 40,000\). What is her qualified student loan interest deduction in 2018 ?
-
How can the ill-effects of multicollinearity be mitigated? Describe each potential remedy and note the advantages and disadvantages of each.
-
The partners of a small accounting firm delegate responsibilities among themselves for various duties. Davis is responsible for professional development. After reserving a banquet room and food for a...
-
Assume today is the 21st of February. Using the information below, FT Extract, answer the following questions (parts i and ii). You work for a US company that is due to receive 250 million in June...
-
Derive a class BuyNItemsGetOneFree from DiscountPolicy, as described in Exercise 10. The class should have a constructor that has a single parameter n. In addition, the class should define the method...
-
Repeat Practice Program 7 using JOptionPane, which is described in the graphics supplements of Chapters 2 and 3. Practice Program 7 Combine the programs from Programming Projects 5 and 6 to read...
-
Revise the class RoomCounter described in the previous exercise to use an assertion instead of an exception to prevent the number of people in the room from becoming negative. Previous exercise...
-
From the following account balances of Josland at 31 December 20X2 prepare a balance sheet in both T-format and narrative classified format. Cash at bank $113 500 Accounts receivable (net) 52 400...
-
Flightboat Ltd borrowed $60 000, issued $20 000 worth of ordinary shares, paid a dividend of $50 000 and the owner withdrew $10 000 in cash. What was Flightboats net cash provided (used) by financing...
-
Obtain the Woolworths 2018 annual report and answer the following questions. Required: 1 How does Woolworths report on its corporate responsibility? 2 List three important points the CEO makes...
Study smarter with the SolutionInn App