studying tends to be a little boring .
So me and evil did this .

His version:
public static void Amirah(ArrayList AmirahList)
{
for (int i = 0; i
{
Amirah A = (Amirah) AmirahList.get( i );

if (A instanceof ScoldAmirah)

{
ScoldAmirah SA = (ScoldAmirah) A;
SA.setMarks(SA.getMarks * 100);
}

else
if (A instanceof BeatAmirah)

{
BeatAmirah BA = (BeatAmirah) A;
BA.setMarks(BA.getMarks * 1000);
}
}
}

My version was :
public static void alexChill(ArrayList alexList)
{ for (int i=0 ; i
{
ALex a=(Alex)AlexList.get(i );
if (a instanceOf DontWorryAlex)
{
DontWorryAlex dwa = (DontWorryAlex) a;
dwa.setMarks(dwa.getMarks() * 10000000000000000);
}

else
if ( a instanceOf JiaYouAlex)
{
JiaYouAlex jya = ( JiaYouAlex) a;
jya.setGPA(jya.getGPA()*1000000);
}
}

}

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s