0% found this document useful (0 votes)
50 views

Assignment 1

The document contains programming assignments for students divided into 3 groups. Each group contains 4 questions related to Java programming concepts at different difficulty levels. The questions cover topics like garbage collection, arrays, loops, recursion, methods and more. Students need to develop programs to remove duplicate elements from an array, search an element in an array, check prime numbers, find the most frequent element and more. Detailed examples are provided for some questions.
Copyright
© © All Rights Reserved
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
50 views

Assignment 1

The document contains programming assignments for students divided into 3 groups. Each group contains 4 questions related to Java programming concepts at different difficulty levels. The questions cover topics like garbage collection, arrays, loops, recursion, methods and more. Students need to develop programs to remove duplicate elements from an array, search an element in an array, check prime numbers, find the most frequent element and more. Detailed examples are provided for some questions.
Copyright
© © All Rights Reserved
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 2

NEW HORIZON COLLEGE OF ENGINEERING, BANGALORE

DEPARTMENT OF COMPUTER APPLICATIONS Programming Concepts


Using Java (19MCA31)
III Semester MCA
Assignment 1
DATE : 28/08/19

MAX.MARKS : 7.5

Group1

S.No. Question Level CO’s

1 Examine the operation of garbage collection and finalizers in java. L4 CO1,


CO2

2 Develop a program on your own to remove the duplicate elements in an array L6 CO3,
and print CO4

3 Develop a program to initialize an integer array with values and check if a L6 CO3,
given number is present in the array or not. If the number is not found, it will CO4
print -1 else it will print the index value of the given number in the array
Ex1) Array elements are {1,4,34,56,7} and the search element is 90
O/P: -1
Ex2)Array elements are {1,4,34,56,7} and the search element is 56
O/P: 4

4 Design a program on your own to check the given number is prime number or L6 CO1,
not CO2

Group2

S.No. Question Level CO’s

1 Illustrate type casting in detail with proper example? L3 CO1,


CO2

2 Develop a program on your own to print the element of an array that has L6 CO3,
occurred the highest number of times CO4

3 Develop a program on your own to find sum of n numbers using enhanced for L6 CO1,
loop CO2

4 Construct a program to print prime numbers between 10 and 99 L6 CO1,


CO2

Group3

S.No. Question Level CO’s

1 Illustrate the importance of this keyword with example L3 CO1,


CO2

2 Design a program that displays a menu with options 1. Add 2. Sub L6 CO1,
Based on the options chosen, read 2 numbers and perform the relevant CO2
operation. After performing the operation, the program should ask the user if
he wants to continue. If the user presses y or Y, then the program should
continue displaying the menu else the program should terminate. Note: Use
Scanner class

3 Develop a program on your own to find the largest 2 numbers and the L6 CO3,
smallest 2 numbers in the given array CO4

4 Develop a program on your own to find the factorial of a given number using L6 CO3,
recursion CO4

Faculty Incharge HOD-MCA

You might also like