chapter_5_beginning_javabook

It then transforms the remaining statements the

Info iconThis preview shows page 1. Sign up to view the full content.

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

Unformatted text preview: e variables. It then transforms the remaining statements, the action statements, to numerical instructions to be processed during program execution. The action statements in a source program describe the activities a computer performs when the executable version of the program is run by a computer. The action statements of a program are executed in an order that corresponds with the order in which the statements are written in the source program. In the case of the program Game.java, the computer performs the following activities: • • First it asks the user to enter an integer from the keyboard. It then reads the integer entered from the keyboard and stores it in variable integer_from_keyboard. • Then it calculates a value that is one larger than the user-given integer and stores that value in variable one_larger_integer. • In the end, it displays the values of both variables and informs the user that the computer won the game. There are four action statements in Game.java. Each statement is terminated wit...
View Full Document

This document was uploaded on 01/20/2014.

Ask a homework question - tutors are online