Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create a class FacebookLikeManager with three public methods. The purpose of this class is to ingest this users.txt file and process it as to later

Create a class FacebookLikeManager with three public methods.

The purpose of this class is to ingest this users.txt file and process it as to later provide information about those users.

users.txt

Mike: Kristen, Sara, Nate, Anthony, Randy

Kristen: Mike, John, Steve, Bill

Bill: Sara, Nate

Sara: Nate, Anthony

A line in the file will look something like this:

Mike: Steve, John, Tony

This line represents that the users Steve, John, and Tony have liked the user Mike.

The three public methods will be:

a public List getAllUsers()

This will return a unique list of all users that appeared in the file. Note: All names in the file are users. Even if a user only appears when liking someone, they will be present in the List returned by getAllUsers.

b public List getLikes(String user)

This will take a String representing a user (like Mike) and return a unique List containing all of the users that have liked the user Mike.

c public List getLikedBy(String user)

This will take a String representing a user (like Tony) and return a unique List containing each user that Tony has liked.

create a Main to test your work.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Understanding Oracle APEX 5 Application Development

Authors: Edward Sciore

2nd Edition

1484209893, 9781484209899