Pre-Quiz 3-Fall 2007 Questions
Ask your questions here.
public static boolean isExtinct() { return if(numDinosaurs == 0); }
there is an error for illegal start of expression here.
- the code should read return (numDinosaurs == 0); Joel Uthe
In recitation we concluded that : Animal fido = new Animal() was valid. But when I compile it, there appears the following error: Animal is abstract; cannot be instantiated.....What is this means??? So, is it valid or not? What should be the correct way?
- Abstract classes cannot be instantiated so Animal fido = new Animal() is not valid. Joel Uthe
in question 3b, we are given Dinosaur Petrie = new Dinosaur(), but all the commands used petrie with a little "p". Is it done on purpose or should it be written with capital P?
- petrie should always be with a lowercase p. It has now been corrected. Thanks. Joel Uthe
So I compared my answers with another student in a different recitation and we have a couple different answers for 3. Does 3 (b)ii show 0? Also, does 3(c)ii compile or not?
Link to this Page
- Pre-quiz 3-Fall 2007 last edited on 28 October 2007 at 10:14 pm by c-76-17-114-206.hsd1.ga.comcast.net