preview

Essay on The Art and Science of Java

Better Essays

Answers to Review Questions Chapter 1. Introduction 1. Babbage’s Analytical Engine introduced the concept of programming to computing. 2. Augusta Ada Byron is generally recognized as the first programmer. The U.S. Department of Defense named the Ada programming language in her honor. 3. The heart of von Neumann architecture is the stored-programming concept, in which both data and programming instructions are stored in the same memory system. 4. Hardware is tangible and comprises the physical parts of a computer; software is intangible and consists of the programs the computer executes. 5. The abstract concept that forms the core of computer science is problem-solving. 6. For a solution technique to be an algorithm, it must be • Clearly …show more content…

Chapter 2. Programming by Example 1. The purpose of the comment at the beginning of each program is to convey information to the human reader of the program about what it does. 2. A library package is a collection of tools written by other programmers that perform useful operations, thereby saving you the trouble of implementing those operations yourself. 3. When you execute a program developed using the acm.program package, Java invokes the run method. 4. An argument is information that the caller of a particular method makes available to the method itself. By accepting arguments, methods become much more general tools that provide considerable flexibility to their callers. 5. The println method is used in the context of a ConsoleProgram to display information to the user. The suffix ln is a shorhand for the word line and indicates that the output displayed by the println call should appear on the current line but that any subsequent output should begin on the following line. 6. The readInt method requests an integer value from the user and then returns that value so that it can be used as input to the program. The standard pattern for using the readInt method looks like this: int variable = readInt("prompt"); The Art and Science of Java Answers to review questions –3– 7. The + operator is used to signify addition when it is applied to numeric arguments and

Get Access