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.stringcalculator; | |
| import java.util.InputMismatchException; | |
| import java.util.Scanner; | |
| //Задача: программа "Строковый калькулятор" | |
| // Описание: | |
| // Создайте консольное приложение "Строковый калькулятор". | |
| // Приложение должно читать из консоли введенные пользователем строки, числа, арифметические операции проводимые между ними и выводить в консоль | |
| // результат их выполнения. | |
| // |
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.stringcalculator; | |
| import java.util.InputMismatchException; | |
| import java.util.Scanner; | |
| //Задача: программа "Строковый калькулятор" | |
| // Описание: | |
| // Создайте консольное приложение "Строковый калькулятор". | |
| // Приложение должно читать из консоли введенные пользователем строки, числа, арифметические операции проводимые между ними и выводить в консоль | |
| // результат их выполнения. | |
| // |
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.stringcalculator; | |
| import java.util.InputMismatchException; | |
| import java.util.Scanner; | |
| //Задача: программа "Строковый калькулятор" | |
| // Описание: | |
| // Создайте консольное приложение "Строковый калькулятор". | |
| // Приложение должно читать из консоли введенные пользователем строки, числа, арифметические операции проводимые между ними и выводить в консоль | |
| // результат их выполнения. | |
| // |
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.stringcalculator; | |
| import java.util.InputMismatchException; | |
| import java.util.Scanner; | |
| //Задача: программа "Строковый калькулятор" | |
| // Описание: | |
| // Создайте консольное приложение "Строковый калькулятор". | |
| // Приложение должно читать из консоли введенные пользователем строки, числа, арифметические операции проводимые между ними и выводить в консоль | |
| // результат их выполнения. | |
| // |
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.stringcalculator; | |
| import java.util.InputMismatchException; | |
| import java.util.Scanner; | |
| //Задача: программа "Строковый калькулятор" | |
| // Описание: | |
| // Создайте консольное приложение "Строковый калькулятор". | |
| // Приложение должно читать из консоли введенные пользователем строки, числа, арифметические операции проводимые между ними и выводить в консоль | |
| // результат их выполнения. | |
| // |
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; | |
| public class Terminal { | |
| //user@WIN-J93NHGVMP41 MINGW64 ~/IdeaProjects/OCA_examination/src (master) | |
| // $ java IgorDolgov.cats.Main | |
| // Еды осталось 2500 | |
| // Кошек всего 5 | |
| // Создали абстрактную кошку | |
| // Кошек всего 6 |
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 Terminal { | |
| //user@WIN-J93NHGVMP41 MINGW64 ~/IdeaProjects/OCA_examination/src (master) | |
| // $ java IgorDolgov.cats.Main | |
| // Еды осталось 2500 | |
| // Кошек всего 5 | |
| // Создали абстрактную кошку | |
| // Кошек всего 6 |