🔒 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.

About this Thread

  • 49
    Replies
  • 2K
    Views
  • 7
    Participants
Last reply from:
zxXzzByezzXxz

Trending Topics

Online now

Members online
1,086
Guests online
966
Total visitors
2,052

Forum statistics

Threads
2,273,948
Posts
28,952,610
Members
1,235,003
Latest member
djjdh
Back
Top