Question

Answer the questions in this section based on the following statements: EMPLOYEE_DETAILS [0] [0] = “John”...

Answer the questions in this section based on the following statements:

EMPLOYEE_DETAILS [0] [0] = “John”

EMPLOYEE_DETAILS [0] [1] = “Doe”

EMPLOYEE_DETAILS [0] [2] = “0123456788”

EMPLOYEE_DETAILS [1] [0] = “Jane”

EMPLOYEE_DETAILS [1] [1] = “Doe”

EMPLOYEE_DETAILS [1] [2] = “0123569988”

Q.4.2.1 Consider the statements above, then draw a table to illustrate how the data provided will be stored in memory.

Q.4.2.2 Identify the structure employed to store the values provided at the beginning of the question. Then provide the statement that will declare the structure so that it can be used in an application.

help me with this Programming logic and design question please

java language

Homework Answers

Answer #1

In case of any queries, please revert back.

By looking at the data given, we can say that This is stored in a 2D array of shape [2][3] and is of type String in JAVA.

Q 4.2.1 => In memory, if we consider a row-major Representation, we can say that the following is stored as.

MEMORY LOCATION F_NAME L_NAME PHONE_NUMBER
1000 John Doe 0123456788
2000 Jane Doe 0123569988

So, memory is allocated Consecutively to different blocks. If the first block takes 999 bytes space at 1000 index, next block starts at 2000-2999.

Q. 4.2.2 => This is 2D array of strings with 2 rows and 3 columns.

String[][] EMPLOYEE_DETAILS=new String[2][3];

You can use this easily using :-

EMPLOYEE_DETAILS [0] [0] = “John”

EMPLOYEE_DETAILS [0] [1] = “Doe”

EMPLOYEE_DETAILS [0] [2] = “0123456788”

EMPLOYEE_DETAILS [1] [0] = “Jane”

EMPLOYEE_DETAILS [1] [1] = “Doe”

EMPLOYEE_DETAILS [1] [2] = “0123569988”

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
Code Example 8-1 1. int count = 1; 2. int item_total = 0; 3. int item...
Code Example 8-1 1. int count = 1; 2. int item_total = 0; 3. int item = 0; 4. while (count < 4) { 5.      cout << "Enter item cost: "; 6.      cin >> item; 7.      item_total += item; 8.      ++count; 9. } 10. int average_cost = round(item_total / count); 11. cout << "Total cost: " << item_total << "\nAverage cost: " << average_cost; (Refer to Code Example 8-1.) If the user enters 5, 10, and 15 at the prompts, the output is: Total...
Objectives: ⦁   Declare and initialize null-terminated string ⦁   Apply indirect address ⦁   Write loop ⦁   Apply...
Objectives: ⦁   Declare and initialize null-terminated string ⦁   Apply indirect address ⦁   Write loop ⦁   Apply Irvine.inc library functions to display a string Problem Description: Write a program with a loop and indirect address that copies a string from source to target. Revising the character order in the process. Use the following variables: source BYTE “This is the string that will be reversed”, 0 target BYTE SIZEOF source DUP(‘#’) You may refer to the Programming Exercise #7 on Page 138...
In the following C code, Which variable if NOT of primitive data type? A. a B....
In the following C code, Which variable if NOT of primitive data type? A. a B. b C. c D. d int a = 10; double b = 20.0; float c = false; char d[5] = "Hello"; // here we define a string In programming language C, the implementation of a string data type is limited dynamic length, which means the length of a string variable is fixed once it has been defined. A. True B. False In C# programming...
Code in Java SAMPLE PROGRAM OUTPUT Because there are several different things your program might do...
Code in Java SAMPLE PROGRAM OUTPUT Because there are several different things your program might do depending upon what the user enters, please refer to the examples below to use to test your program. Run your final program one time for each scenario to make sure that you get the expected output. Be sure to format the output of your program so that it follows what is included in the examples. Remember, in all examples bold items are entered by...
Please answer the following Case analysis questions 1-How is New Balance performing compared to its primary...
Please answer the following Case analysis questions 1-How is New Balance performing compared to its primary rivals? How will the acquisition of Reebok by Adidas impact the structure of the athletic shoe industry? Is this likely to be favorable or unfavorable for New Balance? 2- What issues does New Balance management need to address? 3-What recommendations would you make to New Balance Management? What does New Balance need to do to continue to be successful? Should management continue to invest...
What role could the governance of ethics have played if it had been in existence in...
What role could the governance of ethics have played if it had been in existence in the organization? Assess the leadership of Enron from an ethical perspective. THE FALL OF ENRON: A STAKEHOLDER FAILURE Once upon a time, there was a gleaming headquarters office tower in Houston, with a giant tilted "£"' in front, slowly revolving in the Texas sun. The Enron Corporation, which once ranked among the top Fortune 500 companies, collapsed in 2001 under a mountain of debt...
Discuss ethical issues that can be identified in this case and the mode of managing ethics...
Discuss ethical issues that can be identified in this case and the mode of managing ethics Enron finds itself in this case. How would you describe the ethical culture and levels of trust at Enron? Provide reasons for your assessment. THE FALL OF ENRON: A STAKEHOLDER FAILURE Once upon a time, there was a gleaming headquarters office tower in Houston, with a giant tilted "£"' in front, slowly revolving in the Texas sun. The Enron Corporation, which once ranked among...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT