Question: Except the classes mentioned below, no other classes / packages are allowed to solve the following problems. Otherwise, you will automatically receive a ZERO for

Except the classes mentioned below, no other classes/packages are allowed to solve the following problems. Otherwise, you will automatically receive a ZERO for that problem. Create a public class named Yourlastname_Yourfirstname_final (5 pts), then import java.util.Arrays; import java.util.Scanner; import java.lang.IllegalStateException; import java.lang.IllegalArgumentException; import java.lang.Comparable; 1. Write a static method named problem1 that accepts an array of integer values. Loop through each integer and get the integers that dont contain digits 0 or 9. Add them to an array and return this array. (15 pts) Test case: array is {10,22,335,901,99,56}, return {22,335,56}.2. Write a static method named problem2. Give a while loop to keep asking the user for floating point values. When the user enters stop, this loop should be terminated. Throw IllegalStateException if the user enters an integer value (the value of the fractional part is 0). Calculate and return the sum of the fractional parts of the entered values. (15 pts) Test case: if the entered values are 10.5,225.9,112.33, and 1.752, return 2.482.(because 0.5+0.9+0.33+0.752=2.482).3. Write a static method named problem3 that accepts a string. Assume this string contains many words that are separated by spaces. Extract all the words into an array and capitalize each word (the first letter must be upper case and the rest of letters must be lower case), then put the capital letter at the end of the word. Return this array. (15 pts) Test case: string is syntax is the arrangement of words to form a language, return {yntaxS,sI,heT,rrangementA,fO,ordsW,oT,ormF,A,anguageL}.4. Write the main method to run each method with the provided test case. (10 pts) Below this Yourlastname_Yourfirstname_final class, create a default class named Passenger. (15 pts) In this class, create a static variable, called numPassenger, to keep track of the number of Passenger objects that have been created. A passenger object should include the following attributes: id: an automatically generated string as the unique identifier of a passenger. Should be generated based on the value of numPassenger. For example, the first passenger objects id should be 1. ticketType: a string to represent the type of tickets. There are three types of tickets: aisle,middle, and window. Throw IllegalArgumentException for all other values. price: double, the ticket price should be determined by ticketType:

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 Programming Questions!