java applications
java applications
Designation details :
DEPARTMENT OF
Use Switch-Case to print Designation in the output and to find the value of
DA for a particular employee.
2. Objective:
i. Assuming that your class name is Project1, and you execute your code as
java Project1 1003, it should display the following output : Emp No. Emp
Name Department Designation Salary
1003 Rahul Acct Clerk 29000 ii.
java Project1 123
There is no employee with empid : 123
3. Implementation/Code:
import java.util.Scanner;
public class Project1 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String[] empNo = {"1001", "1002", "1003", "1004", "1005", "1006",
"1007"};
String[] empName = {"Ashish", "Sushma", "Rahul", "Chahat",
DEPARTMENT OF
5. Learning Outcomes:
Understand how to map employee details (like designation codes to roles)
using efficient logic and structures.
Learn to identify and address input mismatches or invalid entries through
proper validation and error messages.
Gain skills in presenting data in a well-structured and readable format for
better user understanding.