Advertisement
jaVer404

level12.lesson12.home09

May 13th, 2015
317
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.80 KB | None | 0 0
  1. package com.javarush.test.level12.lesson12.home09;
  2.  
  3. /* Родитель класса CTO
  4. Добавь такой класс-родитель к классу CTO(технический директор), чтобы класс перестал быть абстрактным.
  5. Добавлять/реализовывать методы в классе CTO запрещается.
  6. */
  7.  
  8. public class Solution
  9. {
  10.  
  11.     public static void main(String[] args)
  12.     {
  13.         CTO cto = new CTO();
  14.         System.out.println(cto);
  15.     }
  16.  
  17.     public static interface Businessman
  18.     {
  19.         public void workHard();
  20.     }
  21.  
  22.     public static class Worker implements Businessman {
  23.         public void workHard() {}
  24.     }
  25.  
  26.     public static class CTO extends Worker  implements Businessman
  27.     {
  28.  
  29.     }
  30.  
  31.  
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement