Write a Java program to do the following, using Object Class and Driver Class
a) Read two-dimensional array (3 x3).
b) Find the diagonal elements of the array.
Write a Java program to obtain transpose of a 4 x 4 matrix. The Transpose of the matrix is obtained by exchanging the elements of each row. With the elements of the corresponding column. using Object Class and Driver Class
Write a Java program to do the following
a) Read the names of employeeid, name and salary of all employees.
b) Check whether the given employeeid is present in the array,
if it is not, print the name of the employee and the employeeid.
Write a Java program to do the following
a) Read two-dimensional array (3 x3)
b) Find the diagonal elements of the array
Write a Java program to obtain transpose of a 4 x 4 matrix. The Transpose of the matrix is obtained by exchanging the elements of each row. With the elements of the corresponding column.
The function accepts two positive integers ‘r’ and ‘unit’ and a positive integer array ‘arr’ of size ‘n’ as its argument ‘r’ represents the number of rats present in an area, ‘unit’ is the amount of food each rat consumes and each ith element of array ‘arr’ represents the amount of food present in ‘i+1’ house number, where 0 <= i
a. Critically explain why you would consider the concept of using methods in your program again running a couple of if-else statements.
b. Declare a method with three arguments all of the type int. The method should return the greatest of the three arguments, however, if any two or all three are the same, your method should return that value.
c. Embed your method in a complete program that requests for three variables all of the types int and displays the conditions explained in “b” above.
Write a program with total change amount in pennies as an integer input, and output the change using the fewest coins, one coin type per line. The coin types are Dollars, Quarters, Dimes, Nickels, and Pennies. Use singular and plural coin names as appropriate, like 1 Penny vs. 2 Pennies.
Create a class called Register with three instance variables: username, email, and password. These three pieces of information are all String. Your class should have a constructor that initializes the three instance variables and assumes that the provided values are correct. For each instance variable, provide a set and a get method. Create a displayInformation method in order to display the username, email, and password, separated by a comma ( , ). Create a test application called RegistrationInfoTest that demonstrates the Register class.
An owner of an auto repair shop wishes to organize his team of mechanics at the beginning of the day. To make the distribution of work equal, he organizes cars with an even amount of faults into bay 1 and cars with an odd amount of faults into bay 2. There are nine cars in total Write the pseudocode for the problem, then write a Java program to separate the even and odd number of car faults. Have all even numbers displayed first, then odd numbers at the end. The repairs required for each car are as follows. 18, 14, 12, 6, 4, 21, 19, 9, 3 Hint: WHILE LOOPS and IF.