1.

Describe the waterfall model of software development. Why has this model not proved to be successful?


Answer:


2.

The spiral model of software development envisions software development broken down into multiple phases. A prototype is constructed, and successive passes gradually build up the prototype until it is fully functional. What is the biggest danger of this approach?


Answer:


3.

What is the best software design model? Explain why. Careful; this may be a trick question.


Answer:


4.

You have been given an assignment to write a program to schedule classrooms in your college's building. Classrooms can be reserved for classes, seminars, guest speakers, and for meetings for clubs (such as the Java Users Group). Clubs can meet only after 5 p.m. and only if the room is not needed by any other group. Each group needing a classroom is given a priority. Classes in your college have the highest priority, with clubs having the lowest priority. Some classes in your college have higher priority over others, especially if the instructor has tenure. Classrooms are characterized by size, amenities (overhead projectors, etc.) and comfortable seats. Groups can specifically request a room by room number or simply give a description of what they need. Groups also may request specific time slots or give a range of acceptable time slots. Rooms are not available after 10 p.m. and before 5 a.m.

Make a list of classes that you may need for your program.


Answer:


5.

From your list of potential classes in your classroom-scheduling program, pick three potential classes and identify their main responsibilities.


Answer:


6.

A simple rule for finding classes you may need when designing a program is to look for __________ in the program description.


Answer:


7.

An excellent way to design a program initially is to use the CRC card method. What does the acronym CRC stand for? Briefly describe this method.


Answer:


8.

Using the list of objects for your classroom-scheduling program, identify any objects that may use inheritance. List the super classes (if any) followed by their subclasses. If you see no need for inheritance, explain.


Answer:


9.

Inheritance can be described as an "is-a" relationship between classes. An association can be described as a "has-a" relationship. Using specific examples, explain in detail the difference between inheritance and association. When is association more appropriate than inheritance? When is inheritance more appropriate?


Answer:


10.

In the following code,

      class GroceryBag extends BasicContainer
      {
         private Fruit[] fruits;
         private Vegetable[] veggies;

         . . .

         public void addItem(Food item)
         {
            . . .
         }

         public Money computeTotal()
         {
            . . .
         }

         . . .
      }

Inheritance

From which classes does GroceryBag inherit?

Association

Which classes are associated with GroceryBag?

Dependency

On which classes does GroceryBag depend (exhibit dependency)?


Answer:


11.

Write an applet to be used for ordering from an online pizza restaurant. Allow the user the following choices: pizza size, pizza crust type, pizza toppings, and number of pizzas. The user may select specific toppings or choose from a "Specialty Pizza" such as Deluxe, BBQ Chicken, etc. Display a description for each specialty type. For example, choosing a BBQ chicken pizza would display the description: barbecue sauce, grilled chicken, mozzarella cheese, smoked Gouda cheese, red onion, and cilantro. A user can order multiple pizzas. Require the user to enter a delivery address, email address, phone number, and method of payment (of course, since we won't be programming using a secure server, you do not need to ask for a credit card number, just the type). Save a copy of the order to a text file to be sent by email (you don't need to program the email part).


Answer: