Skip to content
Snippets Groups Projects
Commit 7142e8cc authored by Sara Prifti's avatar Sara Prifti
Browse files

Edited the logic about cutomer ages

parent 8f62c42f
Branches Ying
No related tags found
No related merge requests found
......@@ -94,7 +94,7 @@ public class DataService {
//born before 2008
public static boolean customerIsChild(Customer customer){
boolean isChild= false;
if(Integer.valueOf(customer.getBirthdate().substring(0,4)) <= 2008 ){
if(Integer.valueOf(customer.getBirthdate().substring(0,4)) >= 2008 ){
isChild=true;
}
......@@ -106,7 +106,7 @@ public class DataService {
//born after 1994
public static boolean customerIsStudent(Customer customer){
boolean isStudent= false;
if(Integer.valueOf(customer.getBirthdate().substring(0,4)) <= 1994 && !customerIsChild(customer) ){
if(Integer.valueOf(customer.getBirthdate().substring(0,4)) >= 1994 && !customerIsChild(customer) ){
isStudent=true;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment