Equals Sign and Expo Class Method Essay

Satisfactory Essays
PreAPCS Exposure Java Exercises 05.01- 04 Date:1/15/14 Name: Anam Nawab Period: 4th 1. What Expo class method would you use to enter someone’s name? System.out.print("Enter name ===>> "); 2. Why is a prompt necessary for program input? Without a prompt, the user would just see the cursor flashing on the screen and have no idea what to enter. Chances are the user would not even know he/she is supposed to enter something. With the prompt, the user knows not only that he/she is supposed to enter something; he/she will also know what they are supposed to enter. 3. What does the enterString method do? The enterString method "reads" in an entire string of characters from the keyboard until the key is pressed.…show more content…
When you are about 70 miles from Dallas, shortly after you pass the town of Hillsboro the highway forks. It splits in two. You need to decide between going left which means you will take I35W (Interstate 35 West) to Fort Worth or going right which means you will take I35E (Interstate 35 East) to Dallas. 25. Explain Repetition. Another common application occurs when repetition is required. A grade book program needs to average grades for every student in a class of twenty-five students. A payroll program needs to process paychecks for many employees. Practically everything you can imagine is done multiple times. Nobody is interested in repeating program source code 500 times for some task that is to be performed 500 times. We want to create one program segment, and place this segment in some type of loop control structure that repeats 500 times. 26. What do Selection and Repetition control structures have in common? Both the selection control structure diagrams and the repetition diagram indicate a change of program flow occurring after some condition 27. What is the essence of understanding, and using, control structures? . Understanding conditional statements is the essence of understanding, and using, control structures. However, before we plunge into the syntax of the various conditional statements, you need to understand the relational operators that are used by Java in the conditional
Get Access