Question: I need help with these java codingbat questions please: Create a method that creates a user id, where the user id is made up of

I need help with these java codingbat questions please:

I need help with these java codingbat questions please: Create a method

that creates a user id, where the user id is made up

of the first letter of the first name and the entire last

name. e.g. john smith ->jsmith getUserld("bill", "gates")-"bgates" getUserId("steve", "jobs")"sjobs" getUserId("larry", "page") -"lpage"

Go Save, Compile, Run (ctrl-enter) public String getUserId( String firstName, String lastName)

Given a number n, create an array with elements starting from 1

Create a method that creates a user id, where the user id is made up of the first letter of the first name and the entire last name. e.g. john smith ->jsmith getUserld("bill", "gates")-"bgates" getUserId("steve", "jobs")"sjobs" getUserId("larry", "page") -"lpage" Go Save, Compile, Run (ctrl-enter) public String getUserId( String firstName, String lastName) Given a number n, create an array with elements starting from 1 to n. e.g. 5 > getNumArray(1) [1] getNumArray (2) [1, 2] getNumArray(3) - [1, 2, 3] Go Save, Compile, Run (ctrl-enter) public int[] getNumArray(int n) Given a number n, create an array with odd number starting from 1 to n. e.g. 5 -> getoddNum Array(1) [1] getoddNumArray(5)- [1, 3, 5] Go Save, Compile, Run (ctrl-enter) public int[] getOddNumArray (int n) t Get the maximum int value in a given int array getMaxFromArray([1, 2, 3])3 getMaxFromArray([-1, -2, -31)--1 getMaxFromArray([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) 10 Go Save, Compile, Run (ctrl-enter) public int getMaxFromArray intl nums) Get the minimum int value in a given int array getMinFromArray([1, 2, 3])1 oetMinF romrayc-i. 3. 0, 9, 10, 23, -10, .50. -2, -3])-3 getMinFromArray([-1, -3, 0, -9, -10, 23, -100, -50, -323])-323 Go Save, Compile, Run (ctrl-enter) public int getHInFromArray( intC] nums) Get the average from an integer array. getAverage ([1, 2, 3]) 2.0 getAverage([1, 2, 3, 4, 5, 5, 6, 7])- 4.125 getAverage([2, 23, 8, 3, 5, 56, 4565, 12]) 584.25 Go ave, Compile, Run (ctr-enter) how Hint public double getAverage(int[] nums)

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!