-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathManager.java
More file actions
75 lines (60 loc) · 1.73 KB
/
Manager.java
File metadata and controls
75 lines (60 loc) · 1.73 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
/*PLEASE DO NOT EDIT THIS CODE*/
/*This code was generated using the UMPLE 1.31.1.5860.78bb27cc6 modeling language!*/
import java.util.*;
// line 74 "model.ump"
// line 177 "model.ump"
public class Manager extends Employee
{
private String username;
private String password;
//------------------------
// MEMBER VARIABLES
//------------------------
//------------------------
// CONSTRUCTOR
//------------------------
public Manager(String aName, double aSalary, double aHoursWorked)
{
name = aName;
username = aName.toLowerCase();
password = "test1";
salary = aSalary;
hoursWorked = aHoursWorked;
isManager =true;
}
//------------------------
// INTERFACE
//------------------------
public String getUsername(){
return username;
}
public String getPassword(){
return password;
}
private void addEmployee(Object employee, List<Object> employees){
if(!employees.contains(employee)){
employees.add(employee);
} else {
System.out.println("Employee already in Database");
}
}
private void removeEmployee(Object employee, List<Object> employees){
if(employees.contains(employee)){
employees.remove(employee);
} else {
System.out.println("Employee not in Database");
}
}
private void addTopping(Pizza pizza, String topping){
if(!Pizza.toppinngs.contains(topping))
pizza.ingredients.add(topping);
else
System.out.println("Topping already exist in list");
}
private void removeTopping(Pizza pizza, String topping){
if(!Pizza.toppinngs.isEmpty() && Pizza.toppinngs.contains(topping))
Pizza.toppinngs.remove(new String(topping));
else
System.out.print("No ingredient found to remove");
}
}