Answer to Question #275967 in Java | JSP | JSF for Athul

Question #275967

The assignment will contain 4 departments as four different object classes



i) Super Department



ii) Admin Department



iii) Hr Department



iv) Tech Department




1
Expert's answer
2021-12-06T02:18:04-0500

You can declare classes using the keyword 'class' and classes can contain methods and fields and so on :

abstract class Department {
   private String name;
   private int floors;

   abstract void someMethod();
}

class SuperDepartment extends Department {
  @Overload
  void someMethod() {
    // impl logic
  }
}

class AdminDepartment extends Department {
  @Overload
  void someMethod() {
    // impl logic
  }
}

class HrDepartment extends Department {
  @Overload
  void someMethod() {
    // impl logic
  }
}

class TechDepartment extends Department {
  @Overload
  void someMethod() {
    // impl logic
  }
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS