Question: Student ID: Except the classes mentioned below, no other classes / packages are allowed to solve the following problems. Create a public class named Yourlastname
Student ID:
Except the classes mentioned below, no other classespackages are allowed to solve the following problems.
Create a public class named YourlastnameYourfirstnamefinal pts
import java.util.Arrays;
import java.util.Sacanner;
import java.lang.IllegalStateException;
import
java.io;
import java.lang.Comparable;
import java.lang.IndexOutOfBoundsException;
Write a static method named problem that accepts two arrays of integer values. Find and return the union of two arrays. Each element must be unique in the union array. You may assume each array contains unique elements. Return the result. pts
Test case: array is array is return
Write a static method named problem that keeps asking the user for string literals. Throw IllegalStateException if the entered string literal is empty. When the user enters "stop", the loop should be terminated. Capitalize each word the first letter must be upper case and the rest of letters must be lower case Join all the words together and separate any two words by using # pts
Test case: if the entered words are "apple", "BANANA", "oRANGE", "stop", return "Apple#Banana#Orange".
Write a static method named problem that accepts an array of string literals. Remove all the strings with length greater than Return the result. pts
Test case: array is "python", "java", "javascript", c return "java", c
Write a static method named problem that receives a path of a text file. Read data from the given file. Handle the IOException and the FileNotFoundException. Calculate the sum of all the digits then write the result back to the file. pts
Test case: the text in the test.txt file is:
abccda
cc
Write to the text file because
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
