Home
1 ??????

?????? ??????????? ??? Java'????

??????? ????????????? ??????????????? ??? ????? ???????????, ??? ??????? ??????????????????:

  • ?????????????? ????????? ????? (Cup) ??????? ? ?????? ?????? getCup() - ? ?????????? ???????? ????? ????? ??????????, ???? ??? ?? - NoClearCupExcepion
  • ??????? ?????? ?? 300 ?? ??????? ???? ? ?????????? ??????? (??? ?????? ??????? ???????, ???????????? ????????? Boiler)
  • ???? ?????? ?????????????? ? ??????????? ?????????, ???????????? ???????? Hand, ??????????? ?????????? ??????????????? ? ??????? ???????? ?? ????? ?????????
  • ??????????? ?????? TeaBag (?? ???????? ????) ? ????????????????? ????????? ?????? (Cup)
  • ?? ????????? ????????? ??????? ?????? ?????? ?????? ?????? ??????? ???? (HotWaterPortion) - ? ?????? ?????? ??? ???????? ???? (ColdWaterPortion) - ?? ???? ???? ???????. ? ?????? ?????????? ???????? ??????????? ???? ????? ????????????? ????? ?????? ????????? ? ??????? ????, ???? ????? ????? ?????? isHot () ? ?????? ???????. ?????? ????? ???????? ??????????, ? ?? ????? ??? ?????? ????? ????????? FingerBurnedException.
  • ?????????, ??? ???? ???????, ????? ???? ????????? ?????? ???? ? ??? ?? ????????? ?????, ? ??????? ??? ????????? ??????? ??????? ???.
  • ???????? ????? brew() ??????? ?????. ????? ?????? ???????? ?????????? ????? ? ??????? ? ?????? ???? ????? ???????? ? TeaPortion. ?????? ??? ?????????? ??????? ?????????? ???? ????????, ??? ????? ???????? wait(30000) ?? ??????? ????? (?? ???????? ??????? ?????????? ????????, ????? ?????? ???????????? ????? ?????? ???????, ?????? ???? ??? ???? ??????? ????????? ??????? ???????????)
  • ?? ????????? ?????????? ??? ?????. ???????? ??????? removeBag(), ????? ??????? ???????. ??? ?????? ? ??? ?????? - ??????? ????. ? ????? ?????? GarbageCollector ??? ????? ?????? ?????????.
  • System.out.println ("Enjoy your tea");

?????? ?????

06.09.2014