Designing A Program
Study Questions

  1. What is meant by software engineering?


  2. Which of these statements is always true?
    1. All of the program requirements must be completely defined before design begins.
    2. All of the program design must be complete before any coding begins.
    3. All of the coding must be complete before any testing can begin.
    4. Different development activities often take place concurrently, overlapping in the software life cycle.

  3. Fill in the blanks. "Software specifications tell exactly ____________________________________a program will do, but not _________________________________."

  4. Name two ways in which you can make your programs meet Goal 2: "Quality software can be read and understood."


  5. Explain why software might need to be modified
    1. in the design phase
    2. in the coding phase
    3. in the testing phase
    4. in the maintenance phase

  6. Goal 4 says, "Quality software is completed on time and within budget."
    1. Explain some of the consequences of not meeting this goal for a student preparing a class programming assignment.
    2. Explain some of the consequences of not meeting this goal for a team developing a highly competitive new software product.
    3. Explain some of the consequences of not meeting this goal for a programmer who is developing the user interface (the screen input/output) for a spacecraft launch system.

  7. What is the first step in developing any software program?



  8. You are working on a class programming assignment, and the details of one of the requirements are ambiguous. What are some ways of dealing with this problem?


  9. There is usually one way of solving a problem that is clearly better than any other. (True or False?)

  10. Write a top-down design for making a birthday cake.


  11. Explain what is mean by "information hiding." Why is the following section of code an example of information hiding?
         tax = rate * taxableIncome;
         cout << "Your tax liability is"  << tax << endl;


  12. What is meant by implementation?


  13. What separates the logical properties of a program's data or functions from its implementation?


  14. Give an example of data abstraction.


  15. The documentation of a program should begin as soon as the testing is complete so that the documentation perfectly matches the final correct version of the program. (True or False?)

  16. What is meant by "external documentation"? Give two examples.


  17. Suggest where some comments could be added to the following code segment to make it more understandable:
         for (int i = 0, i <  maxIndex , i++ )		
         processEntry (list, i, false, 100, successFlag);


  18. Use the idea of self-documenting code to make the following code segment more understandable:
    			double x, y, z ;
    			z = x * 3.1417 * (y * y)	

  19. True or False? (Correct any false statements.) Good programming practices dictate that
    1. a procedure should be written before its specifications.
    2. when doing top-down design, you should try to avoid changing the main program as you work on lower levels.
    3. when doing top-down design, you should always first decide on the data structures that will be used.
    4. What part of a program's code is analogous to the main module of the top-down design?

    Continue to:  Unit 1  / Prev  / Next