Exp-1.1 19BCS1431
Exp-1.1 19BCS1431
1
Student Name: M.Sudharshan UID: 19BCS1431
Branch: CSE Section/Group: NTPP_CI_1A
Semester: 6th Date of Performance: 12/2/2022
Subject Name: PBLJ LAB Subject Code: CSP-358
int EmpNo;
String EmpName;
String JoinDate;
char DesigCode;
String Dept;
int Basic;
int HRA;
int IT;
Employee(int no, String name, String date, char code, String dep, int bas, int hra, int it) {
EmpNo = no;
EmpName = name;
JoinDate = date;
DesigCode = code;
Dept = dep;
Basic = bas;
HRA = hra;
IT = it;
}
public class Project1 {
Employee[] employees = {
new Employee(1001, "Ashish", "01/04/2009", 'e', "R&D", 20000, 8000, 3000), new
Employee(1002, "Sushma", "23/08/2012", 'c', "PM", 30000, 12000, 9000), new Employee(1003,
"Rahul", "12/11/2008", 'k', "Acct", 10000, 8000, 1000), new Employee(1004, "Chahat",
"29/01/2013", 'r', "Front Desk", 12000, 6000, 2000), new Employee(1005, "Ranjan", "16/07/2005",
'm', "Engg", 50000, 20000, 20000), new Employee(1006, "Suman", "1/1/2000", 'e',
"Manufacturing", 23000, 9000, 4400), new Employee(1007, "Tanmay", "12/06/2006", 'c', "PM",
int no = Integer.parseInt(args[0]);
if (emp.EmpNo == no) {
int DA = 0;
switch (emp.DesigCode) {
case 'e':
DA = 20000;
designation = "Engineer";
break;
case 'c':
DA = 32000;
designation = "Consultant";
break;
case 'k':
DA = 12000;
designation = "Clerk";
break;
case 'r':
DA = 15000;
designation = "Receptionist";
break;
case 'm':
DA = 40000;
designation = "Manager";
break;
System.out.printf("%7s %15s %15s %15s %15s\n", "Emp No.", "Emp Name", "Department",
"Designation", "Salary");
System.exit(0);
} catch (Exception e) {
} finally{
System.out.println("\nCode by 19BCS1431\n");
} }
}
4. Result/Output/Writing Summary:
5. Learning Outcomes
I learned -