Skip to content

Commit 935a157

Browse files
committed
feat: Family and Test file in Java by Dwight Blue
1 parent 9222330 commit 935a157

File tree

2 files changed

+8
-3
lines changed
  • lesson_16/objects/objects_app/src

2 files changed

+8
-3
lines changed

lesson_16/objects/objects_app/src/main/java/com/codedifferently/lesson16/Family.java

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,14 @@ public boolean hasADivThree() {
3434
}
3535
return false;
3636
}
37-
38-
public Object hasSixKids() {
37+
public int agesSizeValue() {
38+
return ages.size();
39+
}
40+
public boolean hasSixKids() {
3941
// TODO Auto-generated method stub
40-
throw new UnsupportedOperationException("Unimplemented method 'hasSixKids'");
42+
int num = ages.size();
43+
44+
return num <6;
4145
}
4246

4347
// throw new UnsupportedOperationException("Unimplemented method 'hasA12YO'");

lesson_16/objects/objects_app/src/test/java/com/codedifferently/lesson16/FamilyTest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ void testFamily_hasDivThree() {
3232
}
3333

3434
@Test
35+
// has SixKids
3536
void testFamiy_hasSixKids() {
3637
// int i = 0;
3738

0 commit comments

Comments
 (0)