Question: writestubsfor each class so that your code compiles. Java code please User.java This class bundles methods/data for a User object. public User(String name, String password)

writestubsfor each class so that your code compiles.writestubsfor each class so that your code compiles.Java code please User.java ThisJava code please

User.java This class bundles methods/data for a User object. public User(String name, String password) - constructs a new instance of the User class with the specified name and password. public String getName() - returns the name of the user. public boolean attemptLogin(String password) - returns true if the password is valid for this user. False otherwise. public void addPlaylist(Playlist newPlaylist) - adds the specified playlist to the user's playlists. public List getPlaylists() - returns a list of the playlists for this user. public void selectPlaylist(String name) - selects the playlist with the specified name if the user has a playlist by that name and plays the newly selected playlist. public String toString() - returns a string description of the user. The format is name, numPlaylists playlists. So if I had a user cjenkins who had 12 playlists this method would return "cjenkins, 12 playlists

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!