forked from maheshashokit/27_Java_Full_Stack_Repo
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSmartWatch.java
More file actions
30 lines (24 loc) · 975 Bytes
/
SmartWatch.java
File metadata and controls
30 lines (24 loc) · 975 Bytes
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
//This class is for creating SmartWatch Functionality
public class SmartWatch extends BasicWatch {
//Defining Fields of SmartWatch
public double temperatureDegrees;
//Defining the public non-parameterized Constructor
public SmartWatch() {
System.out.println("SmartWatch Class public non-parameterized constructor....");
}
//Defining the Parameterized Constructor for intialization
public SmartWatch(double temperatureDegress) {
this.temperatureDegrees = temperatureDegress;
}
//Defining the Business method for setting temperature of SmartWatch
public void setTemperatureForSmartWatch(double temperatureDegrees) {
this.temperatureDegrees = temperatureDegrees;
}
public void displayTemperatureInfo() {
System.out.println("Temperature:::" + temperatureDegrees);
}
//Defining Business method for displaying health information
public void displayHealthInfo() {
System.out.println("Displaying the Health Informaton From SmartWatch.....");
}
}