333
333
co/java-j2ee-soa-training
Version 1.0
Module 1 – Introduction to Java www.edureka.co/java-j2ee-soa-training
Table of Contents
Question Statement 1 ............................................................................................................................. 2
Question Statement 2 ............................................................................................................................. 2
Question Statement 3 ............................................................................................................................. 3
Note: ....................................................................................................................................................... 3
Question Statement 1
1. Write a program to accept 5 employee IDs and the corresponding names and their salaries
from the user and store them in three arrays. Pass these arrays to a function display() as
arguments. This display() will display the content of the arrays in the following format.
ID Name Salary
00 John 600000
Question Statement 2
2. Write another function display() with Employee ID array and Employee name array as
arguments. (Note: here we are using concept of function overloading). This function will
display the content of the 2 arrays in the following format.
ID Name
00 John
002 Clark
003 Nancy
004 Joe
005 Mary
Question Statement 3
3. Write another function named display() which takes 4 arguments. The arguments are
named as String and 3 arrays (Employee id, name and salary). Function prototype looks like:
display (String name, int regno[], String Empname[], double salary[]).
This function will search for the name in the Empname array and will display its
corresponding id and salary in the below given format. For example, if Divya is given as the
name to search then display () function will display the following record.
ID Name Salary
00 John 600000