This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package IgorDolgov.cats; | |
| public class Count { | |
| static int count; | |
| public static void main(String[] args) { | |
| count = getNextCount(); | |
| } | |
| static int getNextCount() { | |
| count++; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package IgorDolgov.cats; | |
| //class Cat { | |
| // int consumed; // храним кол-во съеденной пищи | |
| // void eatFrom(Plate plate) { | |
| // // int portion = получите из тарелки порцию еды (так чтобы и в тарелке еда тоже уменьшилась) | |
| // // увеличьте consumed на размер этой порции | |
| // System.out.println("Кошка съела из тарелки " + portion); | |
| // System.out.println("Кошка всего съела " + consumed); | |
| // } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package IgorDolgov.cats; | |
| //class Cat { | |
| // int consumed; // храним кол-во съеденной пищи | |
| // void eatFrom(Plate plate) { | |
| // // int portion = получите из тарелки порцию еды (так чтобы и в тарелке еда тоже уменьшилась) | |
| // // увеличьте consumed на размер этой порции | |
| // System.out.println("Кошка съела из тарелки " + portion); | |
| // System.out.println("Кошка всего съела " + consumed); | |
| // } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package IgorDolgov.cats; | |
| //class Cat { | |
| // int consumed; // храним кол-во съеденной пищи | |
| // void eatFrom(Plate plate) { | |
| // // int portion = получите из тарелки порцию еды (так чтобы и в тарелке еда тоже уменьшилась) | |
| // // увеличьте consumed на размер этой порции | |
| // System.out.println("Кошка съела из тарелки " + portion); | |
| // System.out.println("Кошка всего съела " + consumed); | |
| // } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package IgorDolgov.cats; | |
| //class Cat { | |
| // int consumed; // храним кол-во съеденной пищи | |
| // void eatFrom(Plate plate) { | |
| // // int portion = получите из тарелки порцию еды (так чтобы и в тарелке еда тоже уменьшилась) | |
| // // увеличьте consumed на размер этой порции | |
| // System.out.println("Кошка съела из тарелки " + portion); | |
| // System.out.println("Кошка всего съела " + consumed); | |
| // } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package IgorDolgov.cats; | |
| //class Cat { | |
| // int consumed; // храним кол-во съеденной пищи | |
| // void eatFrom(Plate plate) { | |
| // // int portion = получите из тарелки порцию еды (так чтобы и в тарелке еда тоже уменьшилась) | |
| // // увеличьте consumed на размер этой порции | |
| // System.out.println("Кошка съела из тарелки " + portion); | |
| // System.out.println("Кошка всего съела " + consumed); | |
| // } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package IgorDolgov.cats; | |
| import java.util.Random; | |
| //class Cat { | |
| // int consumed; // храним кол-во съеденной пищи | |
| // void eatFrom(Plate plate) { | |
| // // int portion = получите из тарелки порцию еды (так чтобы и в тарелке еда тоже уменьшилась) | |
| // // увеличьте consumed на размер этой порции | |
| // System.out.println("Кошка съела из тарелки " + portion); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package IgorDolgov.cats; | |
| import java.util.Calendar; | |
| import java.util.Random; | |
| //class Cat { | |
| // int consumed; // храним кол-во съеденной пищи | |
| // void eatFrom(Plate plate) { | |
| // // int portion = получите из тарелки порцию еды (так чтобы и в тарелке еда тоже уменьшилась) | |
| // // увеличьте consumed на размер этой порции |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package IgorDolgov.cats; | |
| import java.util.Calendar; | |
| import java.util.Random; | |
| //class Cat { | |
| // int consumed; // храним кол-во съеденной пищи | |
| // void eatFrom(Plate plate) { | |
| // // int portion = получите из тарелки порцию еды (так чтобы и в тарелке еда тоже уменьшилась) | |
| // // увеличьте consumed на размер этой порции |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package IgorDolgov.wareHome; | |
| import java.util.ArrayList; | |
| import java.util.Calendar; | |
| import java.util.Random; | |
| import java.util.Scanner; | |
| //class Thing{ |