te a UserService Interface with following methods. addUser(User user) updateUser(User user) deleteUser(int userID) getUser(int userID) unblockUser(int userID) blockUser(int userID) „List getAllUsers() e InMemoryUserService class that shall implement UserService contract or interface. Use List for storage, update and retrieve operations inside InMemoryUserService i.e. you shall define tic attribute ArrayList users = new ArrayList 0; The implemented methods shal ge/read this list to perform the reguired operation Test all methods from UserTest class Getting

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
100%

USE JAVA LANGUAGE

USE JAVA LANGUAGE
Create a UserService Interface with following methods.
void addUser(User user)
void updateUser(User user)
void deleteUser(int userID)
User getUser(int userID)
void unblockUser(int userlID)
void blockUser(int userID)
ArrayList<User> getAllUsers()
Define InMemoryUserService class that shall implement UserService contract or interface. Use
ArrayList for storage, update and retrieve operations inside InMemoryUserService i.e. you shall define
a static attribute ArrayList<User> users = new ArrayList (); The implemented methods shall
change/read this list to perform the required operation. Test all methods from UserTest class. Getting
information from user input is encouraged but optional.
Define at least id, name, and status instance attributes in User class of type int, String and Boolean. How
you check whether a user account is blocked? If status attribute is false, it means user account is blocked.
True represent the account is active. Make a test class to test the functionality of UserService . no need
to take inputs from user. Just call its different methods to see how it works, keep printing related
information on console to show what the program is doing.
Transcribed Image Text:USE JAVA LANGUAGE Create a UserService Interface with following methods. void addUser(User user) void updateUser(User user) void deleteUser(int userID) User getUser(int userID) void unblockUser(int userlID) void blockUser(int userID) ArrayList<User> getAllUsers() Define InMemoryUserService class that shall implement UserService contract or interface. Use ArrayList for storage, update and retrieve operations inside InMemoryUserService i.e. you shall define a static attribute ArrayList<User> users = new ArrayList (); The implemented methods shall change/read this list to perform the required operation. Test all methods from UserTest class. Getting information from user input is encouraged but optional. Define at least id, name, and status instance attributes in User class of type int, String and Boolean. How you check whether a user account is blocked? If status attribute is false, it means user account is blocked. True represent the account is active. Make a test class to test the functionality of UserService . no need to take inputs from user. Just call its different methods to see how it works, keep printing related information on console to show what the program is doing.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY