import java.io.*;
public class EmployeeAgeCheck {
public static void main(String[] args) throws IOException
{
EmployeeData e=new EmployeeData();
e.getdetails();
e.checkage();
}
}
class EmployeeData
{
private String name;
private int age;
public void getdetails() throws java.io.IOException
{
// user defined input at runtime
BufferedReader buf=new BufferedReader(new InputStreamReader(System.in));
System.out.println("Enter name");
name=buf.readLine();
System.out.println("Enter Age");
age=Integer.parseInt(buf.readLine());
}
public void checkage()
{
if(age<=30)
{
System.out.println(name+ " ,You're Junior Employee");
}
else
{
System.out.println(name+ " ,You're Senior Employee");
}
}
}
public class EmployeeAgeCheck {
public static void main(String[] args) throws IOException
{
EmployeeData e=new EmployeeData();
e.getdetails();
e.checkage();
}
}
class EmployeeData
{
private String name;
private int age;
public void getdetails() throws java.io.IOException
{
// user defined input at runtime
BufferedReader buf=new BufferedReader(new InputStreamReader(System.in));
System.out.println("Enter name");
name=buf.readLine();
System.out.println("Enter Age");
age=Integer.parseInt(buf.readLine());
}
public void checkage()
{
if(age<=30)
{
System.out.println(name+ " ,You're Junior Employee");
}
else
{
System.out.println(name+ " ,You're Senior Employee");
}
}
}
Comments
Post a Comment
Share this to your friends