Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
- */
- package com.mycompany.ja12;
- /**
- *
- * @author Admin
- */
- public class Main2 {
- public static void main(String[] args) {
- // создать иерархию с несколькими уровнями (2-3 уровня)
- Employee director = new Employee("name"); // 1
- //directror.add(new Employee("name1"));
- Employee man1 = new Employee("man1"); // 1
- Employee man2 = new Employee("man1"); // 1
- director.add(man1);
- director.add(man2);
- //
- for(Employee e: director.getSubordinates()){
- System.out.println("e.name=" + e.getName());
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement