The method findMinElement(int arr1[i],int arr2[]) of class MinArray accepts
two integer array arr1,arr2 it is supposed to return the smallest elements in both
the input arrays Another method sortArray(int arr[]) sorts
...
The method findMinElement(int arr1[i],int arr2[]) of class MinArray accepts
two integer array arr1,arr2 it is supposed to return the smallest elements in both
the input arrays Another method sortArray(int arr[]) sorts the input array arr
in ascending order.
Your task is to use sortArray(int arr[]) method and complete the code
in FindMinElement(int arr1[],int arr2[]).so that it possible all test cases.
PROGRAM :
2. QUESTION:
The method getarraysum[int arr[]) of class arraysum is supposed to return the
sum of elements of an input array on input array arr.
The function compiles successfully but fails to return the desired result due to
logical errors.
PROGRAM:
3. QUESTION:
The function checkGrade(int marks) is supposed to return a student’s grade
when the student’s test marks is passed to it as an argument (0 <= marks <=
100)
Given a particular marks, a grade is calculated as per the following table:
Score Grade
4. QUESTION:
The method findMaxElement(int arr1[i],int
arr2[]) of class MaxArrayElement accepts two integer array arr1,arr2 it is
supposed to return the smallest elements in both the input arrays Another
method sortArray(int arr[]) sorts the input array arr in ascending order.
Your task is to use sortArray(int arr[]) method and complete the code
in FindMinElement(int arr1[],int arr2[]).so that it possible all test cases.
PROGRAM :
5. QUESTION:
The method printCharacterPattern(int n) of class CharacterPattern is
expected to print shown below.
6. QUESTION:
The function removeElement( int arr[],int index)takes an array arr of
length lenas an input. It is supposed to return an array after removing the
integer at the given index in the input array arr. If the given index is out of
bounds, then this function should return the input array arr
The function compiles successfully but fails to return the desired result due to
logical errors
PROGRAM:
7. QUESTION:
You are a software developer at ABC technologies. You are supposed to
enhance the functionality of a particular module which control a functionality
based on date of logging.
Given two date, your task is to write a method which calculates the difference
between them. The difference (which shall always be zero o0r a positive
number) would then be used by another module to perform checks on logging.
Developer at ABC technologies already use a pre-defined class date containing
day, month and year as members and also a collection of method for performing
some common operations. You are supposed to make use of these methods to
calculate and return the difference.
(Please refer to the Helper Code tab for details regarding the class)
The method difference_in_dates(Date date1, Date date2) has to be completed
which takes two date
instances as inputs and returns the difference.
PROGRAM:
8. QUESTION:
The function CountElement(int arr[],int n) of class ElementCount is
supposed to return the number of elements in the input array arr whic
[Show More]