0% found this document useful (0 votes)
9 views

Java Assessment

The document outlines several programming challenges involving SQL and string manipulation functions. It includes tasks such as joining vendor information in SQL, checking character separation in a string, finding the longest word, modifying letters in a string, and determining if a number is a power of two. Each challenge specifies the expected input and output format for the functions to be implemented.

Uploaded by

Pranali Gawale
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

Java Assessment

The document outlines several programming challenges involving SQL and string manipulation functions. It includes tasks such as joining vendor information in SQL, checking character separation in a string, finding the longest word, modifying letters in a string, and determining if a number is a power of two. Each challenge specifies the expected input and output format for the functions to be implemented.

Uploaded by

Pranali Gawale
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

SQL Vendor Join

Hide Question

In this MySQL challenge, your query should return the vendor information along with the values from
the table cb_vendorinformation. You should combine the values of the two tables based on the

GroupID column. The final query should only print out the GroupID, CompanyName, and final count

of all rows that are grouped into each company name under a column titled Count. The output table

should be then sorted by the Count column and then sorted by GroupID so that a higher number

appears first.

Your output should look like the following table.


AB Check

Have the function ABCheck(str) take the str parameter being passed and return the string true if

the characters a and b are separated by exactly 3 places anywhere in the string at least once (ie.
"lane borrowed" would result in true because there is exactly three characters between a and b).
Otherwise, return the string false.

Longest Word

Have the function LongestWord(sen) take the sen parameter being passed and return the longest

word in the string. If there are two or more words that are the same length, return the first word from
the string with that length. Ignore punctuation and assume sen will not be empty. Words may also

contain numbers, for example "Hello world123 567"

Letter Changes

Hide Question

Have the function LetterChanges(str) take the str parameter being passed and modify it using

the following algorithm. Replace every letter in the string with the letter following it in the alphabet
(ie. c becomes d, z becomes a). Then capitalize every vowel in this new string (a, e, i, o, u) and finally
return this modified string.
Powers of Two

Have the function PowersofTwo(num) take the num parameter being passed which will be an

integer and return the string true if it's a power of two. If it's not return the string false. For example if
the input is 16 then your program should return the string true but if the input is 22 then the output
should be the string false.

You might also like