# Week 3 Solution

\$30.00

Category:

## Description

Objective: To understand the concepts of Array and Constructor.

Assignments:

1. Write a Java program to calculate Sum & Average of an integer array.

1. Write a Java program to implement stack using array.

1. Write a Java program to implement Queue using array.

1. Write a Java program to calculate Sum of two 2-dimensional arrays.

1. Write a Java program to find the range of a 1D array.

1. Write a Java program to search an element in an array.

1. Write a Java program to find the sum of even numbers in an integer array.

1. Write a Java program to find the sum of diagonal elements in a 2D array.

1. Reverse the elements in an array of integers without using a second array.

1. Write a Java program to enter n elements in an array and find smallest number among them.

1. Write Java program to find the sum of all odd numbers in a 2D array.

1. Write a Java program to print transpose of matrix.

1. Write a Java program to check whether a given matrix is sparse or not.

1. Write a Java program to count the prime numbers in an array.

1. Write a Java program to find second highest element of an array.

1. Write a Java program which counts the non-zero elements in an integer array.

1. Write a Java program to merge two float arrays.

1. Write a Java program where elements of two integer arrays get added index wise and get stored into a third array.

1. Write a Java program to multiply two matrices.

1. Write a Java program to subtract two matrices.

1. Write a Java program to find duplicate elements in a 1D array and find their frequency of occurrence.

1. Write a Java program to print every alternate number of a given array.

1. Given are two one-dimensional arrays A & B, which are sorted in ascending order. Write a Java program to merge them into single sorted array C that contains every item from arrays A & B, in ascending order.

1. Write a Java program to show 0-arguments constructor.

1. Write a Java program to show parameterized constructor.