Answered step by step
Verified Expert Solution
Question
1 Approved Answer
create a representation of your network with friends. For that purpose, for the sake of simplicity, use a list collection. Create everyone as a person
create a representation of your network with friends. For that
purpose, for the sake of simplicity, use a list collection. Create everyone as a person where each
person has unique identifier SSN Create a person with a name, surname, and
this unique identifier. For example:
Person ali new PersonAliKorkmaz;
Person ayse new PersonAyeKorkmaz;
Person murat new PersonMuratKorkmaz;
Person nilay new PersonNilayKorkmaz;
Person deniz new PersonDenizErdeniz;
Person emre new PersonEmreYorulmaz;
Use a proper data structure and Java collection for keeping relations:
When we want to see all the people a person is connected, for example for Aye Korkmaz
it must find all the connected people and must show them once:
is connected to and and ; is connected to and ; is connected to
; is connected to and ;
Therefore, Aye Korkmaz is connected to Ali KorkmazMurat Korkmaz
Nilay Korkmaz and also is connected to Emre Yorulmaz since Emre Yorulmaz is
connected to Ali Korkmaz and Ali Korkmaz is connected to Aye Korkmaz
So all the people whom Aye Korkmaz connected are
If we want to find whom Aye Korkmaz not connected, then we have Deniz Erdeniz
Create people and demonstrate the functionality of your code. Ensure your code is readable,
understandable, and sufficiently commented. Your code should be compiled and run without
errors better you handle exceptions use List, Stack, Queue, Priority Queue, Set, and Map.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started