Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Solution {
- public static void main(String[] args) {
- //напишите тут ваш код
- }
- public static class Human {
- //напишите тут ваш код
- public String toString() {
- String text = "";
- text += "Имя: " + this.name;
- text += ", пол: " + (this.sex ? "мужской" : "женский");
- text += ", возраст: " + this.age;
- if (this.father != null)
- text += ", отец: " + this.father.name;
- if (this.mother != null)
- text += ", мать: " + this.mother.name;
- return text;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement