subject

public class UserName 1/ The list of possible user names, based on a user's first and last names and initialized by the constructor private ArrayList possibles ; /* Constructs a UserName object as described in part (a). • Precondition: firstName and lastNane have length greater than a and contain only uppercase and lowercase letters. public UserName(String firstName, String lastName) {/" to be implemented in part (a) */) /** Returns true if arr contains name, and false otherwise. */ public boolean isused(String name, Strinell arr) [/" implementation not shown ) /* Removes strings from possibleNames that are found in usedNames as described in part (6) public void setAvailableUserNames(Strinel) usedNames) { 1 to be implemented in part (6) (a) Write the constructor for the UserName class. The constructor initializes and fills possibleNames with possible user names based on the firstName and lastName parameters. The possible user names are obtained by concatenating lastName with different substrings of firstName. The substrings begin with the first character of firstName and the lengths of the substrings take on all values from 1 to the length of firstName.

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 11:00
Lisa’s company, abc ltd., lost its biggest client and is now facing a financial crunch. most of her colleagues have resigned, but lisa decides to stay with the company and assist the management in overcoming the financial situation. which quality is lisa demonstrating? a. self-management b. cooperativeness c. responsibility d. loyalty
Answers: 2
question
Computers and Technology, 24.06.2019 03:00
With editing, word automatically displays a paste options button near the pasted or moved text. a. cut-and-paste b. drag-and-drop c. inline d. copy-and-carry
Answers: 1
question
Computers and Technology, 24.06.2019 10:00
Which two technologies support the building of single-page applications?
Answers: 2
question
Computers and Technology, 24.06.2019 22:30
Distinguish between a skill resume and a chronological resume and explain when it is best to use each format
Answers: 1
You know the right answer?
public class UserName 1/ The list of possible user names, based on a user's first and last names and...
Questions
question
English, 21.07.2021 17:10
question
Social Studies, 21.07.2021 17:10
Questions on the website: 13722367