-
Notifications
You must be signed in to change notification settings - Fork 0
/
Author.java
55 lines (50 loc) · 1.8 KB
/
Author.java
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
48
49
50
51
52
53
54
55
import java.util.ArrayList;
import java.util.Date;
import java.util.UUID;
/**
* An Author User
* @authors: J TEA: Tessa Neal, Eve Blom, Anna Phan, and Jacqueline Askey
*/
public class Author extends User {
private ArrayList<Course> myCourses;
/**
* Creates an Author
* @param id An Author UUID
* @param firstName Author's First Name
* @param lastName Author's Last Name
* @param email Author's email
* @param birthday Author's birthday
* @param username Author's username
* @param password Author's password
* @param type Author's Account Type
*/
public Author(UUID id, String firstName, String lastName, String email, Date birthday, String username,
String password, AccountType type) {
super(id, firstName, lastName, email, birthday, username, password, type);
}
/**
* Returns details of the author
* @return A string representation of a Author
*/
public String toString() {
return "id: " + id +
"\nFirst Name: " + firstName +
"\nLast Name: " + lastName +
"\nEmail: " + email +
"\nBirthday: " + birthday +
"\nUsername: " + username +
"\nAccount type: " + type;
}
/**
* Allows Author to create a course
* @param title course title
* @param description course description
* @param syllabus course syllabus
* @param difficult course difficultly
* @param language course language
* @param modules course modules
*/
public void addCourse(String title, String description, String syllabus, Difficulty difficult, Language language, ArrayList<Module> modules) {
Course newCourse = new Course(id, title, description, syllabus, difficult, language, modules);
}
}