Giter Site home page Giter Site logo

iyan22 / socialnetwork Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 4.65 MB

Programming project of the subject Data Structures and Algorithms given in second year of Computer Science Engineering in UPV/EHU.

License: MIT License

Java 100.00%
algorithms computer-science-engineering data-structures ehu java social-network staruml uml-diagram upv

socialnetwork's People

Contributors

davyuni avatar iyan22 avatar

Watchers

 avatar

socialnetwork's Issues

Given the surname find his/her friends

On the social network: given a person surname, retrieve his/her friends. If there are several people with the same surname then you should print out the list of friends for each of those people. The information to be retrieved can be printed out in the console or to a file (Person’s id and Surname).

Given two dates find people born between them sorted

On the social network: retrieve the people who were born between dates D1 and D2, sorted by birthplace, surname, name. We consider only the “year” of the date, disregarding the values of month and day. The order relationship will be implemented according to the lexicographic order (dictionary's order) of the strings used for the attributes.

Relations in the social network

The file named friends.txt (see below) has in each row two person identifiers that represent a friendship relation. The task is to implement an operation that relates them in the network, that is, the relationship has to be stored in the network. Example of the content of the file friends.txt (note: friendship relations are reciprocal).

      Jon232,Mikel34
      Mikel34,Xabi112
      Roberto22,Xabi112
      Miriam21,Xabi112
      Leire1,Miriam21
      ...

The file friends.txt describes the friendship relation among people as pairs of identifiers. A pair is not taken into account if either of its identifiers does not appear in the file people.txt. If an identifier appears in the file people.txt but it is not mentioned in the file friends.txt, that person does not have friends in the social network.

Given two people find shortest chain of relationships

Six degrees of separation is the theory that everyone on Earth is six or fewer steps away, by way of introduction, from any other person in the world, so that a chain of “a friend of a friend" statements can be made to connect any two people in a maximum of six steps (or five intermediaries).
On the social network: given two people of the network, your task is to retrieve the shortest chain that relates them.

Given a set of ID's find all the people born in the same place as ID's given

Given a set of identifiers in a file named residential.txt, recover the values of the attributes name, surname, birthplace and studiedat of the people on the network whose birthplace matches the hometown of the people who are described in residential.txt. People whose birthplace/hometown is unknown do not affect the result of this operation. For example, if the file residential.txt contains the identifiers Mike222 and Mary123, your task is to retrieve the hometown of Mike222 and Mary123 people, and find all people who were born in those towns.

Initial menu

The application must present an initial menu with the different choices for interacting with the social network.
For example
“MY_MENU”
1. Load ‘people’ into the network ...
2. Load ‘relationships’...
3. Print out people
4. Search ...
...
...
n. Log out

Add person to social network from file

On the social network: upload people's data (people.txt) from a file in your directory and add them to the social network. Use the function developed in the previous point.
The file people.txt describes the collection of people in the network. Only the people appearing in that file are considered to belong to the social network. Each person identifier has only one occurrence in the file, but the information for that person may be incomplete. Only the identifier is compulsory.
Your software application must be able to load several “people” files (one at a time).

Add person to social network (function)

On the social network: take the data from a person and add him/her to the network. This function does not read any data from Console. This function receives the data as parameters and adds that information to the network.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.