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 mycats; | |
| 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 mycats; | |
| 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 mycats; | |
| 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
| import java.awt.*; | |
| import java.awt.event.*; | |
| import javax.swing.*; | |
| public class SimpleChatBot extends JFrame implements ActionListener { | |
| final String TITLE_OF_PROGRAM = "Chatter: simple chatbot"; | |
| final int START_LOCATION = 200; | |
| final int WINDOW_WIDTH = 450; | |
| final int WINDOW_HEIGHT = 150; |
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
| import javax.swing.*; | |
| import javax.swing.text.SimpleAttributeSet; | |
| import javax.swing.text.StyleConstants; | |
| import javax.swing.text.StyledDocument; | |
| import java.awt.*; | |
| import java.awt.event.ActionEvent; | |
| import java.awt.event.ActionListener; | |
| import java.util.Date; |
OlderNewer