diff --git a/src/main/java/org/example/Employee.java b/src/main/java/org/example/Employee.java
new file mode 100644
index 0000000..4ef4d38
--- /dev/null
+++ b/src/main/java/org/example/Employee.java
@@ -0,0 +1,67 @@
+package org.example;
+
+public class Employee {
+ private String name;
+ private String email;
+ private int age;
+ private double salary;
+
+ public Employee(String name, String email, int age, double salary){
+ setName(name);
+ setEmail(email);
+ setAge(age);
+ setSalary(salary);
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ if (name == null) {
+ System.out.println("Name is null");
+ return;
+ }
+ this.name = name;
+ }
+
+ public String getEmail() {
+ return email;
+ }
+
+ public void setEmail(String email) {
+ if (email == null || !email.contains("@")) {
+ System.out.println("Email is null");
+ return;
+ }
+ this.email = email;
+ }
+
+ public int getAge() {
+ return age;
+ }
+
+ public void setAge(int age) {
+ if (age > 0) {
+ this.age = age;
+ } else {
+ System.out.println("Age must be positive.");
+ }
+ }
+
+ public double getSalary() {
+ return salary;
+ }
+
+ public void setSalary(double salary) {
+ if (salary >= 0) {
+ this.salary = salary;
+ } else {
+ System.out.println("Salary cannot be negative.");
+ }
+ }
+
+ public String getDetails(){
+ return "Name: " + name + ", Email: " + email + ", Age: " + age + ", Salary: " + salary;
+ }
+}
diff --git a/src/main/java/org/example/Intern.java b/src/main/java/org/example/Intern.java
new file mode 100644
index 0000000..8f08460
--- /dev/null
+++ b/src/main/java/org/example/Intern.java
@@ -0,0 +1,16 @@
+package org.example;
+
+public class Intern extends Employee {
+ private static final double maxSalary = 20000;
+ public Intern(String name, String email, int age, double salary) {
+ super(name, email, age, salary);
+ }
+ @Override
+ public void setSalary(double salary) {
+ if (salary > maxSalary) {
+ System.out.println("Salary is greater than max salary");
+ }else {
+ super.setSalary(salary);
+ }
+ }
+}
diff --git a/src/main/java/org/example/Main.java b/src/main/java/org/example/Main.java
new file mode 100644
index 0000000..d77470c
--- /dev/null
+++ b/src/main/java/org/example/Main.java
@@ -0,0 +1,32 @@
+package org.example;
+
+import java.io.FileWriter;
+import java.io.IOException;
+
+//TIP To Run code, press or
+// click the icon in the gutter.
+public class Main {
+ public static void main(String[] args) {
+ Employee[] employees = new Employee[10];
+
+ employees[0] = new Employee("John Smith", "john.smith@mail.com", 30, 5000);
+ employees[1] = new Employee("Emma Johnson", "emma.johnson@mail.com", 28, 6200);
+ employees[2] = new Employee("Michael Brown", "michael.brown@mail.com", 35, 7200);
+ employees[3] = new Employee("Olivia Davis", "olivia.davis@mail.com", 26, 4800);
+ employees[4] = new Employee("William Miller", "william.miller@mail.com", 40, 8500);
+ employees[5] = new Employee("Sophia Wilson", "sophia.wilson@mail.com", 32, 6900);
+ employees[6] = new Employee("James Moore", "james.moore@mail.com", 29, 5400);
+ employees[7] = new Employee("Isabella Taylor", "isabella.taylor@mail.com", 27, 5100);
+ employees[8] = new Employee("Benjamin Anderson", "ben.anderson@mail.com", 38, 9100);
+ employees[9] = new Employee("Mia Thomas", "mia.thomas@mail.com", 31, 6300);
+
+ try(FileWriter fw = new FileWriter("employee.txt")){
+ for(Employee emp : employees){
+ fw.write(emp.getDetails() + "\n");
+ }
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
+}
+