Question
Answered step-by-step

I need help with my Java programming, If anyone could provide me the code; I would really appreciate your help.

Image transcription text

Social Network Topics String Methods, for-loop, Array, 2-D Array Problem You are intrigued by these social networking websites and want to know how they work. You started with figuring out your school's social network. You want to know who is friends with who and how many friends each person has. Write a program that shows a two dimensional array of friends where each element taking a. value of either 1 or 0 representing whether the person at row 3' is friends with person at column 3'. Your program should also output the number of friends each person has. Procedure 1. Ask the user to enter the total number of people in the network to create the 2-D array (There should be at least 1 person in the network). 2. Store their names in a separate array 3. We will decide whether one person is friends with another if their names' lexicographic difference is not greater than 12 4. Populate the 2-D array with 1 representing row i and column j being friends and 0 representing row 1' and column 1' not being friends 5. You should assume that you are not friends with yourself, which means that AmyOfFriendsfijfj] = 0, where i = j 6. Output the 2-D array to the screen (use only tabs for spacing)

... Show more

Image transcription text

6. Output the 2-D array to the screen (use only tabs for spacing) 7. Also output the total number of friends each person has (calculate using the 2-D Array). Error Handling Your code should handle user input errors using loops. For example, if they enter strings like 'j'jane" when you are expecting an integer, you should tell the user to enter the correct input. See sample outputs. Same applies for total number of people in the network. Hints o Math.abs() method 0 String's compareTo method 0 Scanner-'3 hasNextlnt() method 0 Use debugger and breakpoints to find array errors Sample Outputs ----jGRASP exec: java SocialNet What is the total number of friends in the network: DD f £13 an incorrect input! Please enter an integer. Dr 3 Enter name: Db Jack Enter name: DD Jill Enter name: it Bob Jack Jill Bob Jack 0 1 1 Jill I 0 1 Bob 1 1 0 Total Friends Count: Jack 2 Jill 2

... Show more

Image transcription text

Enter name : Bob Jack Jill Bob Jack 0 1 Jill 1 0 1 Bob 1 1 Total Friends Count: Jack Jill NNN Bob ---jGRASP exec: java SocialNet What is the total number of friends in the network: 2 Enter name: Cat Enter name: Zebra Cat Zebra Cat 0 0 Zebra 0 0 Total Friends Count: Cat 0 Zebra 0 More test data: SocialNetworkTestCases.pdf , Read following requirements before submitting your project online! Java program file requirements: Both .java and .class files are required for full credit. Overall usage of best practices in programming is 10%. If your java code compiles and .class is not submitted, you earn up to 80%. . If your java code doesn't compile and .class file is not available, you earn up to 60%. . All programs must be documented clearly (20%), with a document header, in-line documentation statements and a document footer, containing adequate code tests and results in a block level comment, see SampleComments.java Project report in Word should include: . Screenshots of the running output from your program (10%) . A statement of which parts of the requirements(if any) are incomplete or known to be incorrect. Submission: compress all files (including .java, .class and the Word report) into a zip file and submit this zip file online

... Show more

Answer & Explanation
Verified Solved by verified expert
Rated Helpful
<p>Donec aliquet. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam lacinia pulvinar tortor nec facilisis. Pellentesque dapibus efficitur laoreet. Nam risus ante, dapibus a molestie consequat, ultrices ac magna. Fusce dui lectus, congue vel laoree</p> Fusce dui lectus, congue vel laoreet ac, dictum vitae odio. Donec aliquet

Unlock full access to Course Hero

Explore over 16 million step-by-step answers from our library

Subscribe to view answer

, ultrices ac magna. Fusce dui lectus, congue vel laoreet ac, dictum vitae odio. Donec aliquet. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam lacinia pulvinar tortor nec facilisis. Pellentesque dapibus efficitur laoreet. Nam risus ante, dapibus a molestie consequat, ultrices ac magna. Fusce dui lectus, congue vel laoreet ac, dictum vitae odio. Donec aliquet. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam lacinia pulvinar tortor nec facilisis. Pellentesque dapibus efficitur laoreet. Nam risus ante, dapibus a molestie consequat, ultrices ac magna. Fusce dui lectus, congue vel laoreet ac, dictum vitae odio. Donec aliquet. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam lacinia pulvinar tortor nec facilisis. Pellentesque dapibus efficitur laoreet. Nam risus ante, dapibus a molestie consequat, ultrices ac magna. Fusce dui lectus, congue vel laoreet ac, dictum vitae odio. Donec aliquet. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam lacinia pulvinar tortor nec facilisis. Pellentesque dapibus efficitur laoreet. Nam risus ante, dapibus a molestie consequat, ultrices ac magna. Fusce dui lectus, congue vel laoreet ac, dictum vitae odio. Donec aliquet. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam lacinia pulvinar tortor nec facilisis. Pellentesque dapibus efficitur laoreet. Nam risus ante, dapibus a molestie consequat, ultrices ac magna. Fusce dui lectus, congue vel laoreet ac, dictum vitae odio. Donec aliquet. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam lacinia pulvinar tortor nec facilisis. Pellentesque dapibus efficitur laoreet. Nam risus ante, dapibus a molestie consequat, ultrices ac magna. Fusce dui lectus, congue vel laoreet ac, dictum vitae odio. Donec aliquet. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam lacinia pulvinar tortor nec facilisis. Pellentesque dapibus efficitur laoreet. Nam risus ante, dapibus a molestie consequat, ultrices ac magna. Fusce dui lectus, congue vel laoreet ac, dictum vitae odio. Donec aliquet. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam lacinia pulvinar tortor nec facilisis. Pellentesque dapibus efficitur laoreet. Nam risus ante, dapibus a molestie consequat, ultrices ac magna. Fusce dui lectus, congue vel laoreet ac, dictum vitae odio. Donec aliquet. Lorem ipsum dolor sit amet, consectetur adipiscing elit. N

Step-by-step explanation

e ve

xng elit. Nam lacinia pulvinar tortor nec facilisis

18650693

p, consectetur adipiscing elit. Nam lacinia pulvinar tortor nec facilisis. Pellentesque dapibus efficicitur laorefacilisis. Pellentesque dapibus efficitur laoreet. Nam risus ante, dapibus a molestie consequat, ultrices ac magna. Fusce dui

18650781

aciec facilisis. Pellentesque dapibucingusce dui lectu

18650844

, cusce dui lectus, congue vel laoreet ac, dictum vitae odio. Donec aliquet. Lorem ipsum dolor siFusce dui lur laoreet. Nam risus ante, dapibus a molestie consequat, u

18650893

dictrices ac magna. Fusce dui lectus, congue vel laoreet ac, dictum vita

18650910

gue

gue

entesq

sus ante, dapibus a molestie consequat, ultrices ac magna. Fusce dui lectus,

18650638

gue

6 Attachments
image.png
png
image.png
png
image.png
png
image.png
png
image.png
png
image.png
png
Student review
100% (1 rating)
Clear formatting

"Thank you so much for the brief explanation........"