final_review - CS 302 Final Review Questions 1 True or...

Info icon This preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
CS 302 Final Review Questions 1 True or False 1. Polymorphism is the idea that an object contains knowledge of some data and has methods to act upon that data. 2. In the spiral model of the software life cycle, you produce a few prototypes along the way to a final product. 3. Exceptions must always be either propogated or resolved in your code. 4. To read a file "data.txt" from disk, you can create a Scanner object as follows: Scanner fin = new Scanner("data.txt"); 5. When designing classes, candidate classes can be determined by searching the problem de- scription for nouns . 6. A FileNotFoundException will be caught by the following catch block: catch (Exception e) { System.out.println("There was an error"); } 7. Each catch block can be preceeded by multiple try blocks. 8. If forest is an array of type Tree , and the class Tree implements the interface Growable , then Growable g = forest[4]; is legal Java syntax. 9. If array has type int[][][][][] , then array[3][1][4] has type int[][] 10. The statement new Object[3]; creates a new array of 3 actual Object instances. 11. Subclasses may overload inherited methods of a superclass.
Image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern