-
Notifications
You must be signed in to change notification settings - Fork 19
Expand file tree
/
Copy pathAiSoftware.java
More file actions
86 lines (64 loc) · 2.1 KB
/
AiSoftware.java
File metadata and controls
86 lines (64 loc) · 2.1 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
76
77
78
79
80
81
82
83
84
85
86
package object.example.bobbymoney;
public class AiSoftware {
private String aiName;
private String coachType;
private String teachingStyle;
private double minimumTimeSpent;
private String timeFrame;
public AiSoftware(String aiName, String coachType, String teachingStyle,
double minimumTimeSpent, String timeFrame) {
if (minimumTimeSpent < 0.5) {
throw new IllegalArgumentException("Minimum time spent must be at least 0.5 hours (30 minutes).");
}
this.aiName = aiName;
this.coachType = coachType;
this.teachingStyle = teachingStyle;
this.minimumTimeSpent = minimumTimeSpent;
this.timeFrame = timeFrame;
}
public String getAiName()
{
return aiName; }
public String getCoachType()
{
return coachType; }
public String getTeachingStyle()
{
return teachingStyle; }
public double getMinimumTimeSpent()
{
return minimumTimeSpent; }
public String getTimeFrame()
{
return timeFrame; }
public void setAiName(String aiName)
{ this.aiName = aiName; }
public void setCoachType(String coachType)
{
this.coachType = coachType;
}
public void setTeachingStyle(String teachingStyle)
{
this.teachingStyle = teachingStyle;
}
public void setTimeFrame(String timeFrame)
{
this.timeFrame = timeFrame;
}
public void setMinimumTimeSpent(double minimumTimeSpent) {
if (minimumTimeSpent < 0.5) {
throw new IllegalArgumentException("Minimum time spent must be at least 0.5 hours (30 minutes).");
}
this.minimumTimeSpent = minimumTimeSpent;
}
public String getSummary() {
return aiName + " is a " + coachType + " coach using the "
+ teachingStyle + " method for " + timeFrame + ".";
}
public double calculateTotalHours(int sessions) {
if (sessions <= 0) {
throw new IllegalArgumentException("Sessions must be greater than zero.");
}
return minimumTimeSpent * sessions;
}
}