0% found this document useful (0 votes)
2 views4 pages

333

The document outlines an assignment for a Java/J2EE and SOA training module focusing on data handling and functions. It includes three programming tasks that require writing functions to display employee information using arrays, demonstrating concepts such as function overloading and array manipulation. The assignment emphasizes user input, data storage, and retrieval based on specified criteria.

Uploaded by

Somnath Bhakta
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views4 pages

333

The document outlines an assignment for a Java/J2EE and SOA training module focusing on data handling and functions. It includes three programming tasks that require writing functions to display employee information using arrays, demonstrating concepts such as function overloading and array manipulation. The assignment emphasizes user input, data storage, and retrieval based on specified criteria.

Uploaded by

Somnath Bhakta
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

JAVA/J2EE & SOA www.edureka.

co/java-j2ee-soa-training

Module 2: Data Handling and


Functions
Assignment

© 2014 Brain4ce Education Solutions Pvt. Ltd.

Version 1.0
Module 1 – Introduction to Java www.edureka.co/java-j2ee-soa-training

Module 2 – Data Handling and


Functions
Assignment

Table of Contents
Question Statement 1 ............................................................................................................................. 2
Question Statement 2 ............................................................................................................................. 2
Question Statement 3 ............................................................................................................................. 3
Note: ....................................................................................................................................................... 3

© 2014 Brain4ce Education Solutions Pvt. Ltd Page 1


Module 1 – Introduction to Java www.edureka.co/java-j2ee-soa-training

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

002 Clark 550000

003 Nancy 500000

004 Joe 500000

005 Mary 300000

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

© 2014 Brain4ce Education Solutions Pvt. Ltd Page 2


Module 1 – Introduction to Java www.edureka.co/java-j2ee-soa-training

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

Note: main() should have the following steps:


 Declaring the arrays.
 Accepting data for the arrays.
 Calling the 2 display() functions which takes 3 and 2 arguments.
 Accept a user name to search in the array and display the record by calling the display()
function which takes 4 arguments.

© 2014 Brain4ce Education Solutions Pvt. Ltd Page 3

You might also like