Advertisement
Strade351

Task 4.2.4

Jul 8th, 2016
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.66 KB | None | 0 0
  1. /**
  2.  * Created by Anatoliy on 09.07.2016.
  3.  * Task 4.2.4
  4.  */
  5. public class Student {
  6.     private String fName, lName, stuStatus;
  7.     private int studentId;
  8.  
  9.     public Student() {
  10.  
  11.     }
  12.  
  13.     public Student(String fN, String lN, int sId, String stuSt) {
  14.         fName = fN;
  15.         lName = lN;
  16.         studentId = sId;
  17.         stuStatus = stuSt;
  18.     }
  19.  
  20.     public void printStudent() {
  21.         System.out.println(this.fName + " " + this.lName + " " + this.studentId + " " this.stuStatus);
  22. }
  23.  
  24.     public static void main(String[] args) {
  25.         Student Vasyan = new Student("Vasya", "Petrov", 47, "Pocan");
  26.         Vasyan.printStudent();
  27.     }
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement