1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Igoryamba
3 years ago
9

Describe the algorithm you use for looking up a person’s telephone number in the phone book. The input is person’s name; the out

put is the corresponding phone number. No program required.
Explain please
Engineering
2 answers:
Stella [2.4K]3 years ago
7 0

Answer:

The Algorithm for finding a number from a phone book with the person's name as the input and the phone number as output is as follows:

1. Try to remember the name, i.e last name first and first name last, Also make sure you get the spelling right.

2. Using the first letter of the last name, locate the appropriate alphabetical section in which the name should appear.

3. Using the second letter of the last name, find the subsection of first and second letters combined, in the appropriate order, in which the name should appear. (If the last name consists of only two letters, find the appropriate first name.)

4. Using the third letter, find the possible names in a subsection of the first three letters in the correct order. Continue this step with x+1 letters of the name until you have a subsection of names exactly matching the last name of the person whose number you are trying to locate. (x is the number of letters used in the previous step, consistently.) If there is only one of the last name, (check for duplicates) identify the number, and return phone number information.

5. Begin the second step using the first letter of the first name, but limit the section to only those exactly matching the last name. Continue to step 4, again focusing on the first name only within the set of exactly matching last names.

6. When both first and last name match the name you are locating, check for duplicates. IF there are no duplicates, return phone number information.

Explanation:

People's names are generally arranged in phone books in alphabetical order by the last name of the person. The first name of the person is listed after the last name so that people of the same last name can be differentiated.

Svetllana [295]3 years ago
3 0

Answer:

Answer:

The Algorithm for finding a number from a phone book with the person's name as the input and the phone number as output is as follows:

1. Try to remember the name, i.e last name first and first name last, Also make sure you get the spelling right.

2. Using the first letter of the last name, locate the appropriate alphabetical section in which the name should appear.

3. Using the second letter of the last name, find the subsection of first and second letters combined, in the appropriate order, in which the name should appear. (If the last name consists of only two letters, find the appropriate first name.)

4. Using the third letter, find the possible names in a subsection of the first three letters in the correct order. Continue this step with x+1 letters of the name until you have a subsection of names exactly matching the last name of the person whose number you are trying to locate. (x is the number of letters used in the previous step, consistently.) If there is only one of the last name, (check for duplicates) identify the number, and return phone number information.

5. Begin the second step using the first letter of the first name, but limit the section to only those exactly matching the last name. Continue to step 4, again focusing on the first name only within the set of exactly matching last names.

6. When both first and last name match the name you are locating, check for duplicates. IF there are no duplicates, return phone number information.

Explanation:

People's names are generally arranged in phone books in alphabetical order by the last name of the person. The first name of the person is listed after the last name so that people of the same last name can be differentiated.

Explanation:

You might be interested in
You are a planning aide on a team and are given the assignment of researching the historical significance and original blueprint
LenKa [72]
I’m guessing it will be the second one!
8 0
2 years ago
Modify any of the previous labs which would have crashed when non-numeric data was entered by adding exception handling so that
Mashutka [201]

Answer:

see explaination

Explanation:

import java.util.InputMismatchException;

import java.util.Scanner;

public class calculate {

static float a=0,b=0;

double cal()

{

if(a==0||b==0)

{

System.out.println("no values found in a or b");

start();

}

double x=(a*a)+(b*b);

double h=Math.sqrt(x);

a=0;

b=0;

return h;

}

float enter()

{

float val=0;

try

{

System.out.println("Enter side");

Scanner sc1 = new Scanner(System.in);

val = sc1.nextFloat();

return val;

}

catch(InputMismatchException e)

{

System.out.println("Enter correct value");

}

return val;

}

void start()

{

calculate c=new calculate();

while(true)

{

System.out.println("Enter Command");

Scanner sc = new Scanner(System.in);

String input = sc.nextLine();

switch(input)

{

case "A":

a=c.enter();

break;

case "B":

b=c.enter();

break;

case "C":

double res=c.cal();

System.out.println("Hypotenuse is : "+res);

break;

case "Q":

System.exit(0);

default:System.out.println("wrong command");

}

}

}

public static void main(String[] args) {

calculate c=new calculate();

c.start();

}

}

7 0
3 years ago
A gas mixture containing 3 moles CO2, 5 moles H2 and 1 mole water is undergoing the following reactions CO2+3H2 →cH3OH + H2O Dev
Ilya [14]
Aaaaaaaaaaaaaaaaaaaaaa
7 0
2 years ago
Π/4 = 1 - 1/3 + 1/5 - 1/7 + 1/9 ...
leva [86]

Answer: Pi= 4 - 4/3 + 4/5 - 4/7 + 4/9 ...

Explanation:

Is the same as the example,

If Π/4 = 1 - 1/3 + 1/5 - 1/7 + 1/9 ...

Then

(Π/4 )*4= 4*(1 - 1/3 + 1/5 - 1/7 + 1/9 ...)

Π =4 - 4/3 + 4/5 - 4/7 + 4/9 ...

The way to write this is

Sum(from n=0 to n=inf) of (-1)^n 4/(2n+1)

(photo)

6 0
3 years ago
When were dresses made
klio [65]

Answer:

The world's oldest dress called the Tarkhan Dress is at 5,100 to 5,500 years of age.

Does that help? Or do you need something else? I can change my answer if this is not what you need! :D

Explanation:

6 0
3 years ago
Other questions:
  • Calculate the availability of a system where the mean time between failures is 900 hours and the mean time to repair is 100 hour
    15·1 answer
  • To reduce the drag coefficient and thus improve the fuel efficiency of cars,the design of side rearview mirrors has changed dram
    11·1 answer
  • In a reversible process both the system and surrondings can be returned to their initial states. a)-True b)-False
    14·1 answer
  • What determines the depth of the foundation excavation
    9·2 answers
  • Water is flowing in a metal pipe. The pipe OD (outside diameter) is 61 cm. The pipe length is 120 m. The pipe wall thickness is
    9·1 answer
  • From the information generated in Prob. 6.4 (from your previous Aero HW#1), calculate the maximum rate of climb for the single-e
    13·1 answer
  • Write multiple if statements
    5·1 answer
  • A___ remote control can be an advantage to an
    14·2 answers
  • The use of seatbelts in a car has significantly reduced the number of crash fatalities. Which statement best explains how societ
    11·1 answer
  • A heating element for a cooking appliance is stretched too far during installation. What action can be performed? A. Dispose of
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!