Question: Complete the program so that each cell of array sum contains the sum of the corresponding cells of valA and valB: class Exercise3 {

Complete the program so that each cell of array sum contains thesum of the corresponding cells of valA and valB: class Exercise3 {

Complete the program so that each cell of array sum contains the sum of the corresponding cells of valA and valB: class Exercise3 { public static void main(String[] args) { int[] valA = {13, -22, 82, 17); int[] valB = {-12, 24, int[] sum = { 0, 0, 79, -13); 0, 0}; System.out.println( "sum: + sum [0] + " " + sum [1] + " " sum [2] + " " + sum [3] ); }} + Design new class named Employee. The class contains: private variables: private String name. private Float salary. public methods: setName: that initializes Employee's name, setsalary: that initializes Employee's salary, getsalary: that returns Employee' salary In the java main method: create an Employee object named EmpOne. Set the name of the Employee EmpOne as "Ali" and the salary to "12000". print EmpOne's name and EmpOne's salary.

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 Operating System Questions!