0
20kviews
Write a program to read and display the details of ten employees with the following specifications:

Data Members: Emp_id, Emp_name, Emp_salary

Parameterized constructors to initialize data members of Employees and member functions:

Display() :- To display information of all employees.

Marks: 10 M

Year: May 2015

1 Answer
0
730views
import java.io.*;
class Employee {
    int Emp_id;
    String Emp_name;
    int Emp_salary;

    Employee(int empid, String empname, int empsalary) {
        Emp_id = empid;
        Emp_name = empname;
        Emp_salary = empsalary;
    }

    void display() {
        System.out.println("ID: "+this.Emp_id + " Name: "+this.Emp_name + " Salary:" + this.Emp_salary);
    }

    public static void main(String args[]) throws IOException …

Create a free account to keep reading this post.

and 5 others joined a min ago.

Please log in to add an answer.