Logi 20 public void login(){ System.out.println("Enter Username : "); String username = input.nextLine(); System.out.println("Enter Password : "); String pw = input.nextLine(); 21 22 23 |24 25...


On line 47, I am trying to create a method that which takes a String parameter and updates the arrayfor the user. Prompt and what I have so far attatched.


Logi<br>20<br>public void login(){<br>System.out.println(

Extracted text: Logi 20 public void login(){ System.out.println("Enter Username : "); String username = input.nextLine(); System.out.println("Enter Password : "); String pw = input.nextLine(); 21 22 23 |24 25 isAuthenticated=true; 26 System.out.println("Login Successful!"); 27 28 29 } 30 31 //2. printUserDetails public void printUserDetails0{ 32 System.out.println("Username: " + username); System.out.println("Remaining balance: " + balance); System.out.println("Subscriber since: " + Subscriberyr); } 33 34 35 36 37 //3. printTopTrending public void printTopTrending(){ System.out.println("Top 5 Trending items: } 38 39 + Arrays.tostring(Top5Trending)); 40 41 42 43 44 //4. updateContinueWatching 45 46 @ E public void continueWatching (String Movies){ 47 for (String contitem: Movies){ 48 49 } 50 } 51 52 } 53
3. Add the following class methods to it:<br>a. A method that asks for the username and password of the user.<br>Note: Because we do not have any database, just assume all username/password<br>combinations are valid, so set the isAuthenticated variable to true and print a login<br>successful message inside this method with the value of isAuthenticated variable.<br>b. A method that prints Top 5 Trending items in ascending order.<br>(Use Arrays.sort() library method to quickly sort arrays).<br>c. A method that prints logged in username, remaining balance and subscriber since<br>information.<br>d. A method (like updateContinueWatching(String strValue) which takes a String<br>parameter and updates the Continue Watching array for the user. So in NetflixDemo<br>class, take a movie or TV show name as input from the user and pass it to this<br>updateContinueWatching(value) method. Print the final Continue Watching array.<br>Note: New value should take first position in the Continue Watching array (index 0).<br>For example: Say your current Continue Watching array is:<br>[

Extracted text: 3. Add the following class methods to it: a. A method that asks for the username and password of the user. Note: Because we do not have any database, just assume all username/password combinations are valid, so set the isAuthenticated variable to true and print a login successful message inside this method with the value of isAuthenticated variable. b. A method that prints Top 5 Trending items in ascending order. (Use Arrays.sort() library method to quickly sort arrays). c. A method that prints logged in username, remaining balance and subscriber since information. d. A method (like updateContinueWatching(String strValue) which takes a String parameter and updates the Continue Watching array for the user. So in NetflixDemo class, take a movie or TV show name as input from the user and pass it to this updateContinueWatching(value) method. Print the final Continue Watching array. Note: New value should take first position in the Continue Watching array (index 0). For example: Say your current Continue Watching array is: ["Ozark", "Narcos", "Schitts Creek", "The Crown", "Better Call Saul"] And you are now adding "Breaking Bad", then the updated Continue Watching array should look like this: ["Breaking Bad", "Ozark", “Narcos", "Schitts Creek", "The Crown"] So, move all items to the right by 1 (and we lose the last item) and put the new value at index 0.
Jun 04, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here