Order Now

Java program work: Update your Social Network program so that it loads a list of users, and a list of their relationships, from two files:

Java program work: Update your Social Network program so that it loads a list of users, and a list of their relationships, from two files:

people.txt contains a list of the users with all the data needed to create each user: name, date of birth, age, or whatever other information about your user your program stores. Each person is on a separate line. The different fields are separated by a symbol (I recommend the vertical line “|”, it’s on the same key as “”).

relationships.txt contains a list of relationships (friendships, follows, family relationships, or whatever else your social network tracks). Each relationship lists the names of both people in the relationship on each line. The different fields are separated by a symbol (I recommend the vertical line “|”, it’s on the same key as “”).

Example files are attached.

Notes:

1. The data in the files is always text data. If the data you need for your Users is something other than String, e.g. a number or Date, you have to handle the converting of that data from String to the correct format.

2. Files.readLines() and string.split() are your friends.
3. string.split(“|”) will treat “|” as a special character and won’t work as you expect. To do what you want, you have to use to tell it not to treat it as a special character: string.split(“|”)

 

 

 

Order Now

Calculate Your Order Price


Price (USD)
$