Created
January 31, 2014 10:16
-
-
Save timxor/8729566 to your computer and use it in GitHub Desktop.
This file contains 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 lab1; | |
public class Student { | |
private final String firstName, lastName; | |
private String username; | |
private final int id; | |
private final boolean isFulltime; | |
private void generateUsername(String username) { | |
String temp = firstName.substring(0, 1) + lastName.substring(0, 6); | |
username = temp.toLowerCase(); | |
this.username = username; | |
} | |
public Student(String firstName, String lastName, int id, boolean isFulltime) { | |
this.firstName = firstName; | |
this.lastName = lastName; | |
this.id = id; | |
this.isFulltime = isFulltime; | |
generateUsername() | |
} | |
public Student(String firstName, String lastName) { | |
this.firstName = firstName; | |
this.lastName = lastName; | |
id = 0; | |
isFulltime = true; | |
} | |
public static void main(String[] args) { | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment