Exercises


[Page 20]

Exercise 0.1

Fill in the blanks in each of the following statements.

  1. Dividing a problem or a task into parts is an example of the ____________ principle.

  2. Designing a class so that it shields certain parts of an object from other objects is an example of the ____________ principle.

  3. Java programs that can run without change on a wide variety of computers are an example of ____________.

  4. The fact that social security numbers are divided into three parts is an example of the ____________ principle.

  5. To say that a program is robust means that ____________.

  6. An ____________ is a separate module that encapsulates a Java program's attributes and actions.

Exercise 0.2

Explain the difference between each of the following pairs of concepts.

  1. hardware and software

  2. systems software and application software

  3. compiler and interpreter

  4. machine language and high-level language

  5. general-purpose computer and special-purpose computer

  6. primary memory and secondary memory

  7. CPU and ALU

  8. Internet and WWW

  9. client and server

  10. HTTP and HTML

  11. source code and object code

Exercise 0.3

Fill in the blanks in each of the following statements.

  1. A____________ is a set of instructions that directs a computer's behavior.

  2. A disk drive would be an example of a ____________device.

  3. A mouse is an example of an ____________device.

  4. A monitor is an example of an ____________device.

  5. The computer's ____________functions like a scratch pad.

  6. Java is an example of a ____________programming language.

  7. The Internet is a network of ____________.

  8. The protocol used by the World Wide Web is the ____________protocol.

  9. Web documents are written in ____________code.

  10. A ____________is a networked computer that is used to store data for other computers on the network.


[Page 21]
Exercise 0.4

Identify the component of computer hardware that is responsible for the following functions.

  1. executing the fetch-execute cycle

  2. arithmetic operations

  3. executing instructions

  4. storing programs while they are executing

  5. storing programs and data when the computer is off

Exercise 0.5

Explain why a typical piece of software, such as a word processor, cannot run on both a Macintosh and a Windows machine.

Exercise 0.6

What advantages do you see in platform independence? What are the disadvantages?

Exercise 0.7

In what sense is a person's name an abstraction? In what sense is any word of the English language an abstraction?

Exercise 0.8

Analyze the process of writing a research paper in terms of the divide-and-conquer and encapsulation principles.

Exercise 0.9

Analyze your car by using object-oriented design principles. In other words, pick one of your car's systems, such as the braking system, and analyze it in terms of the divide-and-conquer, encapsulation, information-hiding, and interface principles.

Exercise 0.10

Make an object-oriented analysis of the interaction between a student, a librarian, and a library database when a student checks a book out of a college library.




Java, Java, Java(c) Object-Orienting Problem Solving
Java, Java, Java, Object-Oriented Problem Solving (3rd Edition)
ISBN: 0131474340
EAN: 2147483647
Year: 2005
Pages: 275

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net