What's new

Closed Shoutout sa mga programmers dyan!

Status
Not open for further replies.
yun code ng online lesson.. panu ko maloop at lalabas un oldest person thru sa code na yun..

Use for loop to loop. Kaso nonsense yun kasi the way na yung structure ng variables dun sa arraylist ay napakahirap kunin nung value, what you can do is use a function or algorithm to extract the age value from the string.
Not efficient yun. Dapat yung content ng variable mo para sa isang person object ay hindi string formatted lahat.

Suggestions, restructure yung arraylist, use an arraylist inside the main array list. Example

Arraylist = {
Person1 ={
Name = "ben"
Age = 15
}
Person2 = {
Name = "blah"
Age = 13
}


}

Iachieve mo po muna yang maayos na arraylist bago ko ulitin na namang ipaliwanag yung loop
 
yun code ng online lesson.. panu ko maloop at lalabas un oldest person thru sa code na yun..

Use for loop to loop. Kaso nonsense yun kasi the way na yung structure ng variables dun sa arraylist ay napakahirap kunin nung value, what you can do is use a function or algorithm to extract the age value from the string.
Not efficient yun. Dapat yung content ng variable mo para sa isang person object ay hindi string formatted lahat.

Suggestions, restructure yung arraylist, use an arraylist inside the main array list. Example

Arraylist = {
Person1 ={
Name = "ben"
Age = 15
}
Person2 = {
Name = "blah"
Age = 13
}


}

Iachieve mo po muna yang maayos na arraylist bago ko ulitin na namang ipaliwanag yung loop
 
Use for loop to loop. Kaso nonsense yun kasi the way na yung structure ng variables dun sa arraylist ay napakahirap kunin nung value, what you can do is use a function or algorithm to extract the age value from the string.
Not efficient yun. Dapat yung content ng variable mo para sa isang person object ay hindi string formatted lahat.

Suggestions, restructure yung arraylist, use an arraylist inside the main array list. Example

Arraylist = {
Person1 ={
Name = "ben"
Age = 15
}
Person2 = {
Name = "blah"
Age = 13
}


}

Iachieve mo po muna yang maayos na arraylist bago ko ulitin na namang ipaliwanag yung loop

ganun daw kasi dapat yun format. ang trabaho namin is dagdagan lang yun mga given na na codes. medyo magulo nga array nila
 
ganun daw kasi dapat yun format. ang trabaho namin is dagdagan lang yun mga given na na codes. medyo magulo nga array nila
Kung ganun format gusto nila, ehd sa pinakapahirapang way hahaha sorry pero sobrang haba na ng method na yun kasi gagamit pa ng algorithm para makuha yung raw string, iseparate kada name, birthday at gender, then kunin yung numeric format ng birthday, then subtract sa current year. Sobrang haba, very inefficient,
 
Kung ganun format gusto nila, ehd sa pinakapahirapang way hahaha sorry pero sobrang haba na ng method na yun kasi gagamit pa ng algorithm para makuha yung raw string, iseparate kada name, birthday at gender, then kunin yung numeric format ng birthday, then subtract sa current year. Sobrang haba, very inefficient,

ay di ko nalang answeran yun.. nakakabobo lalo ang array. kainis.
 
Status
Not open for further replies.

Similar threads

Back
Top