 class Employee {
    // Private fields (encapsulation)
    private String name;
    private double salary;

    // Setter method (mutator)
    public void setName(String n) {
        name = n;
    }

    // Getter method (accessor)
    public String getName() {
        return name;
    }

    // Setter method for salary
    public void setSalary(double s) {
        if (s > 0) {  // Validation to ensure positive salary
            salary = s;
        }
    }

    // Getter method for salary
    public double getSalary() {
        return salary;
    }

    public static void main(String[] args) {
        Employee emp = new Employee();
        emp.setName("John");
        emp.setSalary(50000);

        System.out.println("Name: " + emp.getName());
        System.out.println("Salary: " + emp.getSalary());
    }
}
