forked from cs-dept-ibbul/java2019
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLab6Author.java
More file actions
47 lines (44 loc) · 1.03 KB
/
Copy pathLab6Author.java
File metadata and controls
47 lines (44 loc) · 1.03 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
40
41
42
43
44
45
46
47
@@ -0,0 +1,45 @@
/**
* Write a description of class Arthur here.
*
* @author (your name)
* @version (a version number or a date)
*/
public class Author
{
// instance variables - replace the example below with your own
private String name, email;
private char gender;
/**
* Constructor for objects of class Arthur
*/
public Author(String name, String email, char gender)
{
this.name=name;
this.email=email;
this.gender=gender;
}
public String getName()
{
return name;
}
public String getEmail()
{
return email;
}
public void setEmail(String email)
{
this.email=email;
}
public char getGender()
{
return gender;
}
public String toString()
{
// put your code here
return "\n"+getName()+" ("+getGender()+") at "+getEmail();
}
}
BIN +894 Bytes ASSIGNMENT/Lab6/BoxDemoModify.java