Skip to content

Commit 8c2e099

Browse files
committed
chore: edit attempt
1 parent ae05f6a commit 8c2e099

File tree

1 file changed

+3
-3
lines changed
  • lesson_16/objects/objects_app/src/main/java/com/codedifferently/lesson16/KimberleeObject

1 file changed

+3
-3
lines changed

lesson_16/objects/objects_app/src/main/java/com/codedifferently/lesson16/KimberleeObject/HeadPhones.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ public class HeadPhones {
1212
private boolean isWireless = true;
1313
private String brands = "Beats";
1414
private boolean isConnectedToBluetooth = false;
15-
1615
public enum HeadPhoneColor {
1716
RED,
1817
BLUE,
@@ -91,14 +90,15 @@ public static boolean isPreferredBrand(String brand) {
9190
}
9291
}
9392

94-
public void connectToBluetooth() {
93+
public boolean connectToBluetooth() {
9594
if (isPoweredOn && isWireless) {
9695
isConnectedToBluetooth = true;
9796
}
97+
return isConnectedToBluetooth;
9898
}
9999

100100
public boolean isConnectedToBluetooth() {
101-
return isConnectedToBluetooth;
101+
return connectToBluetooth();
102102
}
103103

104104
public void wirelessConnection() throws ConnectionNotFoundException {

0 commit comments

Comments
 (0)