public class PhoneNumbersStarter public static void main(String[] args) * Two parallel arrays to hold phone numbers and names ith name matches ith phone number; e indicates number unknown the L tag at the end of the numbers makes them a java long primitive type (necessary to fit 10 digits) You may extend these arrays but DOo NOT modify the types long[] numbers = (9876543210L, 0, 3129152000L, 9094567890L, 3034061234L, 0, 0, 8133774578L}; String[] names = {"Adam Smith", "George Washington", "Alexander Hamilton", "Thomas Payne"," "Betsy Ross", "Martha Washington", "Deborah Sampson", "Patience Wright"}; //TODO: call the methods to test them. You can call them multiple times. Do some phone changes Ask the user to update zero or more phone numbers using a Scanner170 object. User enters name of person, if that person found in people parameter, then allow update of corresponding phone number * in phoneNumbers parameter. Loop asking for names for which to update the phone number until user enters "Done @param phonellumbers - array of phone numbers in order matching names (0 indicates number unknown) @param people - array of people names in same order as phone numbers ereturn boolean true if any numbers were changed; false if no numbers changed successfully (for example if user never enters a name found in people TODO: Enter the rest of your pseudo code here (give details on how you will process user requests, search and make changes. public static boolean updatelumbers(long[] phoneNumbers, String[] people) { //TODO: write your code here return true; // temporary so stub compiles. Replace with your full code for method

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

assignment is to complete the starter code:

 

* Show the full set of names and phone numbers in the format indicated in the assignment
(Display them to the console)
@param phoneNumbers- array of phone numbers in order matching names (0 indicates number unknown)
@param people- array of people names in same order as phone numbers
* TODO:
Enter full pseudo code here (give details about how you will process the input parameters
If helpful, mention key variables to use
and how you will create the correct format.
*/
public static void showPhoneNumbers (long[] phoneNumbers, String[] people) {
//TODO: write your code here
}
}
Transcribed Image Text:* Show the full set of names and phone numbers in the format indicated in the assignment (Display them to the console) @param phoneNumbers- array of phone numbers in order matching names (0 indicates number unknown) @param people- array of people names in same order as phone numbers * TODO: Enter full pseudo code here (give details about how you will process the input parameters If helpful, mention key variables to use and how you will create the correct format. */ public static void showPhoneNumbers (long[] phoneNumbers, String[] people) { //TODO: write your code here } }
public class PhoneNumbersStarter
{
public static void main(String[] args)
{
/* Two parallel arrays to hold phone numbers and names
ith name matches ith phone number; 0 indicates number unknown
the L tag at the end of the numbers makes them a java long primitive type
(necessary to fit 10 digits)
You may extend these arrays but DO NOT modify the types
*/
long[] numbers = {9876543210L, 0, 3129152000L, 9094567890L, 3034061234L, 0, 0, 8133774578L};
String[] names
{"Adam Smith", "George Washington", "Alexander Hamilton", "Thomas Payne",
"Betsy Ross", "Martha Washington", "Deborah Sampson", "Patience Wright"};
//TODO: call the methods to test them. You can call them multiple times. Do some phone changes
}
/**
* Ask the user to update zero or more phone numbers using a Scanner170 object. User enters name
* of person, if that person found in people parameter, then allow update of corresponding phone number
* in phoneNumbers parameter.
* Loop asking for names for which to update the phone number until user enters *Done*
* @param phoneNumbers - array of phone numbers in order matching names (0 indicates number unknown)
* @param people - array of people names in same order as phone numbers
* @return boolean true if any numbers were changed; false if no numbers changed successfully (for
example if user never enters a name found in people
TODO: Enter the rest of your pseudo code here (give details on how you will process user requests,
search and make changes.
*/
public static boolean updateNumbers (long[] phoneNumbers, String[] people) {
//TODO: write your code here
return true;
// temporary so stub compiles. Replace with your full code for method
}
Transcribed Image Text:public class PhoneNumbersStarter { public static void main(String[] args) { /* Two parallel arrays to hold phone numbers and names ith name matches ith phone number; 0 indicates number unknown the L tag at the end of the numbers makes them a java long primitive type (necessary to fit 10 digits) You may extend these arrays but DO NOT modify the types */ long[] numbers = {9876543210L, 0, 3129152000L, 9094567890L, 3034061234L, 0, 0, 8133774578L}; String[] names {"Adam Smith", "George Washington", "Alexander Hamilton", "Thomas Payne", "Betsy Ross", "Martha Washington", "Deborah Sampson", "Patience Wright"}; //TODO: call the methods to test them. You can call them multiple times. Do some phone changes } /** * Ask the user to update zero or more phone numbers using a Scanner170 object. User enters name * of person, if that person found in people parameter, then allow update of corresponding phone number * in phoneNumbers parameter. * Loop asking for names for which to update the phone number until user enters *Done* * @param phoneNumbers - array of phone numbers in order matching names (0 indicates number unknown) * @param people - array of people names in same order as phone numbers * @return boolean true if any numbers were changed; false if no numbers changed successfully (for example if user never enters a name found in people TODO: Enter the rest of your pseudo code here (give details on how you will process user requests, search and make changes. */ public static boolean updateNumbers (long[] phoneNumbers, String[] people) { //TODO: write your code here return true; // temporary so stub compiles. Replace with your full code for method }
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Arrays
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education