Question

In: Computer Science

JAVA PROGRAMMING project 1: Businesses want phone numbers that are easy to remember, and one that...

JAVA PROGRAMMING

project 1:

Businesses want phone numbers that are easy to remember, and one that can be tied to a phone number are even better.

Given the “standard international keypad”, write anaysis and design to determine the phone number based on a user-supplied 7-letter phrase.

1

2 ABC

3 DEF

4 GHI

5 JKL

6 MNO

7 PQRS

8 TUV

9 WXYZ

*

0

#

Test cases:

● BadDogs

● GoodCat

● Glasses

● EatGood

------------------------------------------------------------------------------------------------------------------------

I ONLY NEED ANALYSIS AND DESIGN! NOT CODE!

create an Analysis: (Describe the problem including input and output in your own words.)

--> description of the problem situation is provided all required rules/guidelines are listed. A listing of all necessary inputs/outputs is included

create a Design: (Describe the major steps for solving the problem.)

--> A plan for implementation of a solution is provided. The plan effectively demonstrates the use of loops and conditional branching statements where appropriate to the solution. The plan effectively demonstrates modular program design. The plan is completed using appropriate flowcharting and/or pseudocode techniques The plan includes a listing of all necessary variable declarations (including type), then uses the variables consistently to complete the solution

Solutions

Expert Solution

Analysis:

Here Every time we need to get the input from the user and then need to apply the logic to convert the given input to output.. Every Input must be processed and each alphabet must be converted to the respected to digit based on the mobile keypad format.. Eg : if either A,B or C is given then it will return 2

Design:

Consider a variable to store the user input then take the first element from the input. Now based on the element program will return the digit. This can be achieved by considering two arrays one for characters and other for digit. For a character at index 'x' from character array will be converted to a digit at the index 'x' in digits array. In this manner, every element from the user input will be processed and output will be returned.

Combining of digits returned will be done by multiplying the first occured digit with 10 and later if second digit obtained the multiply first digit with 100 and second digit with 10 and this process continues....


Related Solutions

•• P11.1 Phone numbers and PIN codes can be easier to remember when you find words...
•• P11.1 Phone numbers and PIN codes can be easier to remember when you find words that spell out the number on a standard phone keypad. For example, instead of remembering the combination 2633, you can just think of CODE. Write a recursive function that, given a number, yields all possible spellings (which may or may not be real words). •• P11.2 Continue Exercise P11.1, checking the words against the /usr/share/dict/words file on your computer, or the words.txt file in...
9) Create a java programming where you will enter two numbers and create only one method,...
9) Create a java programming where you will enter two numbers and create only one method, which will return or display addition, substraction, multiplication, division, average and check which number is greater than the other. Everything in one method and call it in main method.
JAVA PROGRAMMING 1)BuildLists: Write a program to create an ArrayList<Integer>. Fill it with numbers from 1...
JAVA PROGRAMMING 1)BuildLists: Write a program to create an ArrayList<Integer>. Fill it with numbers from 1 to 1000. Then remove every even number. Then remove every multiple of 3 remaining Then remove every multiple of 5 Then remove every multiple of 7 Then sum the array, and print.
Java. Part 1 of 4 - Amusement Park Programming Project Requirements: Use the Java selection constructs...
Java. Part 1 of 4 - Amusement Park Programming Project Requirements: Use the Java selection constructs (if and if else). Use the Java iteration constructs (while, do, for). Use Boolean variables and expressions to control iterations. Proper error handling. Class: Ticket – models admission tickets. Instance Fields: number : long – identify the unique ticket. category : String – store the category of the ticket. holder : String – store the name of the person who purchased the ticket. date...
Exercises on Arrays –using C++programming 1. You want an array with the numbers 100 – 105....
Exercises on Arrays –using C++programming 1. You want an array with the numbers 100 – 105. In the boxes below, fill in what your array should have. Fill in the index of each element below it. Array Index Open up your editor and write the following program: Declare an array that has the numbers 100 to 105. (How many elements are there in the array?) Print the array. Save your file and test it. Compare your results with your table...
Programming Language: JAVA In this assignment you will be sorting an array of numbers using the...
Programming Language: JAVA In this assignment you will be sorting an array of numbers using the bubble sort algorithm. You must be able to sort both integers and doubles, and to do this you must overload a method. Bubble sort work by repeatedly going over the array, and when 2 numbers are found to be out of order, you swap those two numbers. This can be done by looping until there are no more swaps being made, or using a...
Java Programming I need an application that collects the user input numbers into an array and...
Java Programming I need an application that collects the user input numbers into an array and after that calls a method that sums all the elements of this array. and display the array elements and the total to the user. The user decides when to stop inputting the numbers. Thanks for your help!
Java programming. *******I Need complete the following requirements in this project: 1/ Remove the applyRandomBonus method...
Java programming. *******I Need complete the following requirements in this project: 1/ Remove the applyRandomBonus method from the test class 2/ Create a File, Printwriter for an output file yourlastnameErrorLog.txt 3/ Set your maximum array size for accounts to 10 4/ Catch InputMismatch and ArrayIndexOutOfBounds exceptions when reading data from the file: a. Skip any lines that cause an exception b. Write information about the exception to the log file, yourlastnameError.txt c. Include exception type and line number in exception...
Java Part 2 of 4 - Amusement Park Programming Project MUST BE COMPATIBLE WITH PART 1...
Java Part 2 of 4 - Amusement Park Programming Project MUST BE COMPATIBLE WITH PART 1 https://www.chegg.com/homework-help/questions-and-answers/java-part-1-4-amusement-park-programming-project-requirements-use-java-selection-construct-q40170145?trackid=ERIFssNL Requirements: Use the Java selection constructs (if and if else). Use the Java iteration constructs (while, do, for). Use Boolean variables and expressions to control iterations. Proper error handling. Class: Merchandise – models merchandise available in the gift shop such as t-shirts, sweatshirts, and stuffed animals. Instance Fields: id : long – to identify the specific merchandise item. category : String – to...
JAVA / I KNOW THERE IS MORE THAN ONE QUESTION BUT THEY ARE SO EASY FO...
JAVA / I KNOW THERE IS MORE THAN ONE QUESTION BUT THEY ARE SO EASY FO YOU I NEED YOUR HELP PLEASE HELP ME. I WILL GIVE UPVOTE AND GOOD COMMENT THANK YOU SO MUCH !!! QUESTION 1 Consider the following program segment: int i = 2; int n = 18; while (i < n) {     if ((i % 2) == 0) i++; else n--; } System.out.println( i ); What is the value of n when the above program...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT