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

JAVA programming Classwork- please answer all prompts as apart of one java programming project Part A...
JAVA programming Classwork- please answer all prompts as apart of one java programming project Part A Add to your project this class Position, which has x and y coordinates. Create an abstract class GameElt, which has a String name, an int health (keep it in the range 0 to 100) and a Position pos. For GameElt, include a default constructor that starts pos at (0, 0), and a parameterized constructor that takes x and y coordinates and a name. health...
It’s not easy to come up with a secure password that one can actually remember. One...
It’s not easy to come up with a secure password that one can actually remember. One of the methods proposed is to take a line of text and take first letter of each word to form a password. An extra step is substitute ”o” with 0, ”a” with ”@”, and ”l” with 1. For instance, using ”Come to the meadow on law street” would yield ”Cttm01s”. Write a program that asks the user to enter a phrase and outputs the...
•• 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.
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...
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...
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...
only the Java programInstructions: This project has three parts. Remember to make a copy of this...
only the Java programInstructions: This project has three parts. Remember to make a copy of this project so you can refer to it when completing the other phases. Review the sample program before starting this project. The sample program does not exactly match the requirements for this project, so some critical thinking will still be required; however, it is a good thing to reference before starting the project. Project 2 is a continuation of Project 1. Modify the code from...
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!
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT