-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathOwner.java
More file actions
39 lines (37 loc) · 1.15 KB
/
Owner.java
File metadata and controls
39 lines (37 loc) · 1.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
/**
* Write a description of class Owner here.
*
* @author (Pan Qi)
* @version (a version number or a date)
*/
public class Owner extends User
{
/**
* A constructor for objects of class Owner.
*/
public Owner(String name,String id,String newEmail,String newPassword)
{
super(name,id,newEmail,newPassword);
}
/**
* Create a displayOwner method to display the owner's details.
* It invokes getId(), getName() and getEmail() method.
*/
public void displayOwner()
{
System.out.println("Owner ID: " + getId());
System.out.println("Owner Name: " + getName());
System.out.println("Email: " + getEmail());
System.out.println("---------------------------------------------------------------");
}
/**
* Create a getDetail method to input user's detail.
* It invokes getName(), getId() , getEmail() and getPassword() method to tranfer the user's detail into detail.
* Then return String detail.
*/
public String getDetail()
{
String detail = getName() + "," + getId() + "," + getEmail() + "," + getPassword();
return detail;
}
}