import java.io.*;
class
employee
{
private
String empname;
private int
empcode;
void
read(String s,int p)
{
empname= s;
empcode=p;
}
void
display()
{
System.out.println("The
employee name is :" +empname);
System.out.println("The
employee code is :"+empcode);
}
}
class
labourer extends employee
{ private
String labourtype;
private
int laboursalary;
void
read1()throws IOException
{
BufferedReader br= new BufferedReader( new InputStreamReader (System.in));
System.out.println("Enter
the employee name:");
String a=br.readLine();
System.out.println("Enter
the employee code :");
int
p= Integer.parseInt(br.readLine());
read(a,p);
System.out.println("Enter
the labourtype :");
labourtype = br.readLine();
System.out.println("Enter
the labour salary :");
laboursalary=Integer.parseInt(br.readLine());
}
void
display1()
{
display();
System.out.println(" The
labour type is : "+ labourtype);
System.out.println(" The
labour salary is :"+laboursalary);
}
}
class single
{ public
static void main (String s[])throws
IOException
{BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
System.out.println("Enter
the number of employees");
int n = Integer.parseInt(br.readLine());
labourer
l[]= new labourer[n];
for(int i=0; i<n; i++)
l[i]=
new labourer();
for(int i=0; i<n; i++)
l[i]
.read1();
for(int i=0; i<n; i++)
l[i].display1();
}
}
Output
|
Nice & Informative Blog !
ReplyDeleteIn case you are searching for the best technical services for QuickBooks, call us at QuickBooks Error 15106 1-855-977-7463 and get impeccable technical services for QuickBooks. We make use of the best knowledge for solving your QuickBooks issues.
Nice & Informative Blog !
ReplyDeleteGiven the recent outbreak of COVID 19, we at QuickBooks Customer Service Number don't just work hard but also help you get rid of the issue in less time.
Hey! What a wonderful blog. I loved your blog. QuickBooks is the best accounting software; however, it has lots of bugs like QuickBooks for MAC Support . To fix such issues, you can contact experts via QuickBooks Support Phone Number (855)963-5959.
ReplyDeleteI’m really happy to say it was an interesting post to read. I learned new information from your article on amity solved synopsis
ReplyDelete, you are doing a great job
steroid satın al
ReplyDeleteheets
NTXX
With a nationwide presence, Active Detailing transforms every vehicle into a work of automotive art, leaving an indelible mark of excellence.
ReplyDeleteA guardrail is a protective device (pole, safety fence, etc.) used to prevent or mitigate damage caused by vehicle collisions within a factory. Many manufacturing plants are operated by forklifts, AGVs, and other vehicles. If these vehicles come into contact with workers or production equipment, serious industrial accidents and shutdowns can occur. In today’s guide, we will introduce you to the top 15 guardrail manufacturers of 2023. Read on to learn more.
ReplyDeleteA drop test machine is used to test the damage caused by dropping the product package and to evaluate the impact strength during transportation and handling. Our drop testers are used for the purpose of dropping tests while keeping the attitude of the specimen and investigating its effect. In addition, it can be used not only for electricity and electronics but also for drop tests in various fields such as medicine, food, and pharmaceutical.
ReplyDeleteLinkotest has proudly served the drop test industry with mechanical drop testers for mobile products, rotating drum testers, drop testers for packages, and all types of drop testers for large items for over 23 years.