mrnisbetsclassroom
« AP computer science »

Welcome Guest. Please Login or Register.
Sept 3, 2010, 3:15am




mrnisbetsclassroom :: General :: General Board :: AP computer science
Page 1 of 3 » Jump to page   Go    [Search This Thread][Reply] [Send Topic To Friend] [Print]
 AuthorTopic: AP computer science (Read 1,348 times)
Nigel Nisbet
Guest
 AP computer science
« Thread Started on Nov 10, 2005, 7:59pm »
[Quote]

Hi everybody, please feel free to use this board to post any questions, discussions (frustrations), successes connected to AP computer science in the LAUSD
Link to Post - Back to Top  IP: Logged
Guillermo
Guest
 Re: AP computer science
« Reply #1 on Jan 3, 2006, 11:47pm »
[Quote]

Are we supposed to post under this thread or create new threads in the General Board ( http://lausdapcs.proboards79.com/index.cgi?board=general ) because i created a new thread in the General Board section but I there aren't any responses...
Link to Post - Back to Top  IP: Logged
Mr Nisbet
Guest
 Re: AP computer science
« Reply #2 on Jan 4, 2006, 3:30pm »
[Quote]

Hi Guillermo

Thanks for notifying me here, I don't always check the other boards so the best thing to let me know if you've got an issue is to leave a simple message on the student board (the one you used before) we can then create trhreads and use the computer science one as necessary

Link to Post - Back to Top  IP: Logged
Arpan Patel
Guest
 Re: AP computer science
« Reply #3 on Jan 7, 2006, 11:54pm »
[Quote]

Hey Mr. Nisbet,
I am having trouble with most of the Chapter 2 Questions (Marine Biology Case Study).
What should i do if i can't answer them?


Link to Post - Back to Top  IP: Logged
Mr Nisbet
Guest
 Re: AP computer science
« Reply #4 on Jan 8, 2006, 1:42pm »
[Quote]

Hi Arpan,

All I really want to do is read ch1 and ch2. If you can't answer the questions don't worry - just make sure you prpint out a copy for yourself (be prepared it's over 100 pages) and we'll start looking at it this week.

See you tomorrow
Link to Post - Back to Top  IP: Logged
Arpan Patel
Guest
 Re: AP computer science
« Reply #5 on Jan 8, 2006, 3:44pm »
[Quote]

Thnx
Link to Post - Back to Top  IP: Logged
Arpan Patel
Guest
 I need HELp!!!
« Reply #6 on Jan 29, 2006, 1:12am »
[Quote]

hey mr nisbet

I had a question about Chpt2 pg40 analysis Question
set 8, #2. I still don't quite understand how to keep track of the fish's age. Can you give me some tips.

thnk you

Link to Post - Back to Top  IP: Logged
Mr Nisbet
Guest
 Re: AP computer science
« Reply #7 on Jan 29, 2006, 12:05pm »
[Quote]

HI Arpan

Thanks for your great question. This is exactly the type of complicated task you should be focussing on and is great preparation for the AP exam.

Ok here's the deal.

First things first, you need to add a new variable to the initialize method in the Fish class called <-- myAge --> (or something like it). This variable must get set to zero when the fish is initialized.

So now every time a new fish is constructed, the constructor calls the initialize method and sets up all the variables including your new one <-- myAge --> so now the fish has an age.

Now we have to figure out how the fish gets older every time the program runs thourgh a single timestep.

Every time the program runs through 1 timestep several things happen you can take advantage of. Inside the (GUI) or ant test main method you call upon the simulation class to take a step like this - <-- sim.step(); -->;

Inside the simulation class calls upon all the fish to act like this <-- f1.act(); --> [assuming there is a fish called "f1"]

Now the act method inside the fish class calls the move method of the fish like this <-- move(); -->

I would suggest that somewhere even in the act or move methods you add one to the age variable for the fish - something along the lines of <-- myAge++; -->

The means that every time the fish gets called to act ( which happens once per timestep) its age increases by one.

See if you can get this to work, and seeing as how I won't see you until Wednesday fell free to ask me any more questions here.

Have a good weekend

Mr. Nisbet
Link to Post - Back to Top  IP: Logged
Arpan
Guest
 Re: AP computer science
« Reply #8 on Jan 30, 2006, 8:05pm »
[Quote]

sry mr. nisbet

Link to Post - Back to Top  IP: Logged
arpan patel
Guest
 Re: AP computer science
« Reply #9 on Jan 30, 2006, 8:07pm »
[Quote]

sry mr.nisbet

i had another question.
how can you convert something that prints out like this java.awt.Color[r=255,g=0,b=0]
to something like red
???
Link to Post - Back to Top  IP: Logged
Mr nisbet
Guest
 Re: AP computer science
« Reply #10 on Jan 30, 2006, 10:17pm »
[Quote]

Hi Arpan

believe it or not

java.awt.Color[r=255,g=0,b=0]

is actually red.

what its saying is this is a Color code with red=255(the highest), green=0(none), blue=0(none)

All colors in java, or in fact any computer are made up by a mixture of red, green and blue. So [r=255, g=255, b=255] would be balck and [r=0, g=0, b=0] would be white etc.

So if your printing out the color and expecting red, then that's exactly what you're getting with

java.awt.Color[r=255, g=0, b=0]

I hope this helps.

by the way what's sry?
Link to Post - Back to Top  IP: Logged
Arpan PAtel
Guest
 Re: AP computer science
« Reply #11 on Jan 31, 2006, 8:31pm »
[Quote]

hey Mr.Nisbet


r we gonna have time in class to finish Cpht.2?

thnx
Link to Post - Back to Top  IP: Logged
Mr Nisbet
Guest
 Re: AP computer science
« Reply #12 on Jan 31, 2006, 11:22pm »
[Quote]

yes, absolutely

see you tomorrow

Mr. Nisbet
Link to Post - Back to Top  IP: Logged
arpan patel
Guest
 Re: AP computer science
« Reply #13 on Feb 12, 2006, 5:11am »
[Quote]

hey mr.nisbet

i had a question about the baseball exercise for hw.

in order to print out the postion or game of the min and max runs, what i did was make a variable max game and made it equal to 3 and i made another int variable and made it equal to 1.

then here is the other part of code that i put in,

int maxgame = 3;
int mingame = 1;




int[] scores = {2,1,3,0,2,1,4};

for(int i = 0; i < scores.length; i++)
{

totalruns = totalruns + scores[i];
if (scores[i] > maxruns) maxruns = scores[i];
if (scores[i] < minruns) minruns = scores[i];

if (scores[i] > maxgame) maxgame=i;
if (scores[i] < mingame) mingame=i;

The problem is that when i print out max game, i get 6 which i think is te right answer, but for min game i also get 6 which is wrong because the lowest scoring game should be on position 3.
i don't get why this happens?

Is there a special array method in which you could input ints or char's and it tells you their postion?

thnkx

Link to Post - Back to Top  IP: Logged
dddddddd
Guest
 Re: Wikipedia Mutha f**ka's?
« Reply #14 on Apr 24, 2006, 11:22pm »
[Quote]

铃声下载 铃声 手机铃声下载 手机铃声 免费铃声下载 手机铃声免费下载
铃声下载 铃声 手机铃声下载 手机铃声 免费铃声下载 手机铃声免费下载
手机铃声下载手机铃声下载 免费铃声下载 电影免费铃声下载 电影 手机铃声下载手机铃声下载 手机铃声下载手机铃声下载手机铃声下载 手机铃声下载手机铃声下载
铃声下载 铃声 手机铃声下载 手机铃声 手机铃声 免费铃声下载 手机铃声免费下载
铃声下载 铃声 手机铃声下载 手机铃声 免费铃声下载 手机铃声免费下载
铃声下载 铃声 手机铃声下载 手机铃声 免费铃声下载 手机铃声免费下载
铃声下载 铃声 手机铃声下载 手机铃声 免费铃声下载 手机铃声免费下载 mp3铃声
铃声下载 铃声 手机铃声下载 手机铃声 免费铃声下载 手机铃声免费下载mp3铃声
铃声下载 铃声 手机铃声下载 手机铃声 免费铃声下载 手机铃声免费下载

Link to Post - Back to Top  IP: Logged
Page 1 of 3 » Jump to page   Go    [Search This Thread][Reply] [Send Topic To Friend] [Print]

Google
Weblausdapcs.proboards.com
Click Here To Make This Board Ad-Free


This Board Hosted For FREE By ProBoards
Get Your Own Free Message Boards & Free Forums!
Terms of Service | Privacy Policy | Report Abuse | Mobile