You are on page 1of 1

CS205 OOPD- Assignment No: 1 DATE: 20/01/2021 DATE OF SUBMISSION- 26/1/2021

Objective: To understand and Implement basic java program concepts using Scanner class.
Q1. Take input from user a character variable in a program and if the value is alphabet then print
"Alphabet" if it’s a number then print "Digit" and for other characters print "Special
Character"
Q2. Write a program to add all the values in a given number and check if the sum is prime
number or not. Ex: 1234->10, not prime.

Objective: To Understand and Implement the concept of arrays in java


Q3. Write a program to find the largest 2 numbers and the smallest 2 numbers in the array
initialized by the user.
Q4. Write a program to print the element of an array that has occurred the highest number of
times Eg) Array -> 10,20,10,30,40,100,99 O/P:10

Instructions:

a) You will write your program in a standard Java editor i.e Blue-J, Eclipse, NetBean etc.
b) Compile the program, debug and execute. Get right output
c) Create one SINGLE WORD FILE name the file <Roll-no-Assignment-NO>
d) Update this file every week and write your program in the same file
e) Following things should be there:
1. Program Problem
2. Code
3. Input/output
4. Snapshot of the output window

You might also like