Java Course Day 4

16
Day 4

description

 

Transcript of Java Course Day 4

  • 1. Day 4
  • 2. Abstract Class
  • 3. animal
  • 4. mammal
  • 5. abstract methods
  • 6. Abstract Class Vs Interface
  • 7. AC - Stereotype
    I - Behavior
  • 8. AC - single
    I - multiple
  • 9. Polymorphism
  • 10. Employee
    abstract calculateSalary()
    Stylist
    Administrator
    calculateSalary()
    calculateSalary()
    ArtMaster
    calculateSalary()
  • 11. for (Employee e : employees) {
    System.out.println(e.getName() + salary: + e.calculateSalary());
    }
  • 12. One more thing about inheritance
  • 13. IS - A
  • 14. HAS - A
  • 15. Black Coffee
    Black Coffee with sugar
    Espresso
    Cappuccino
    Mochaccino
  • 16. Encapsulation
    Inheritance
    Polymorphism