Guest User

Untitled

a guest
Feb 25th, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.97 KB | None | 0 0
  1. public class Patient {
  2.  
  3. private String name;
  4. private String secondName;
  5. private String diagnosis;
  6. private int age;
  7. private boolean stateOfHealth; // true - здоров
  8.  
  9.  
  10. Patient(String secondName, String name, String diagnosism, int age, boolean stateOfHealth) {
  11. this.secondName = secondName;
  12. this.name = name;
  13. this.diagnosis = diagnosis;
  14. this.age = age;
  15. this.stateOfHealth = stateOfHealth;
  16. }
  17.  
  18. public void information() {
  19. System.out.println("Фамилия пациента: " + secondName);
  20. System.out.println("Имя пациента: " + name);
  21. System.out.println("Диагноз: " + diagnosis);
  22. System.out.println("Возрост: " + age);
  23. if (stateOfHealth)
  24. System.out.println("Состояние: здоров");
  25. else System.out.println("Состояние: нездоров");
  26. }
  27.  
  28. String getSecondName() {
  29. return secondName;
  30. }
  31.  
  32. int getAge() {
  33. return age;
  34. }
  35.  
  36. public void seek(int i) {
  37.  
  38. }
  39.  
  40. public void seek(String str) {
  41.  
  42. }
Add Comment
Please, Sign In to add comment