Sunday, July 12, 2009

AP COMPUTER SCIENCE QUESTIONS!!! plz help! thanks :]?

1.Which of the following is a reason 2 use an ArrayList instaed of an array?


a)arraylist allows faster acces to its kth item than an array does


b)arraylist always uses less memory than an array does


c)arraylist can store objects %26amp; an array can only store primitive types


d)arraylist resizes itself as necessary when items r added, but an array does not


e)araylist provides access 2 the # of items it sotres, but an array does not


2.Wen designing classes,which of the following would b the best reason 2 use inheritnace?


a)inheritance allows u 2 write applications tat require fewer base %26amp; super classes


b)inheritance allows the creation of a subclass tat can use the method of its superclass w/out rewriting the code 3 those methods


c)inheritance allows 4 data encapsulation,which noninherited classes do not allow 4 data encapsulation


d)inheritance reduces the # of polymorphic structures encapsulated in applications


e)inheritance guarantees tat the applications will compile %26amp; execute

AP COMPUTER SCIENCE QUESTIONS!!! plz help! thanks :]?
D B
Reply:#1. (D)


#2. (B)
Reply:do your own homework.


No comments:

Post a Comment