Last active
August 29, 2015 14:20
-
-
Save agusmakmun/e7d8a4d2a566c5b7058d to your computer and use it in GitHub Desktop.
Ini adalah Account.java yang merupakan sub class dari Mahasiswa.java.
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
/* | |
Ini adalah Account.java yang merupakan sub class dari Mahasiswa.java. | |
Lihat induk classnya (Mahasiswa.java) : https://gist.github.com/agusmakmun/843ca4d91365024a7121 | |
Lihat pemanggilannya (aksesAccount.java) : https://gist.github.com/agusmakmun/1eaa4ee82bd094a9cf4d | |
@author Summon Agus (L200130113) | |
@blog bloggersmart.net | |
*/ | |
public class Account extends Mahasiswa { | |
protected String username; | |
protected int password; | |
protected String deegree; | |
public Account (String firstName, String lastName, String username, int password) { | |
super(firstName, lastName); | |
this.username = username; | |
this.password = password; | |
} | |
public Account (String firstName, String lastName, String deegree) { | |
super(firstName, lastName); | |
this.deegree = deegree; | |
} | |
public void infoAccount() { | |
System.out.println("Username : "+username); | |
System.out.println("Password : "+password); | |
super.getFullName(); | |
} | |
public void getNameWithDegree() { | |
super.getFullName(); | |
System.out.print(deegree); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment