Name: ___________________________________________________________________
Quiz:
What is printed by the following code?
int j = 10, i = 100;
while (i > 19) {
j += i;
i -= 6;
}
System.out.print(i + " will get ya " + j);
Objective: Loop Programming
In this lab you will improve your Password project so that it repeatedly ask the user for a name to process.
Instructions
- Open your Password project.
- Import the files from Lab 9 Password II lab
- Modify the Repeat class as follows:
- Repeatedly asks the user for a name until the user enters a value that indicates he or she is finished. You will have to decide what that code is.
- Create a password out of the name using the same rules as in the password lab.
Extra Credit:
- Deal, somehow, with the fact that the user might enter a first of last name that is less that four letters.
Grading
| Feature |
Points |
Out of |
Note |
| Quiz |
|
2 |
|
| Read loop |
|
8 |
|
| Short names (extra credit) |
|
5 |
|
| Total |
|
10 |
|
| |
|
|
|
Notes:
Comments (0)
You don't have permission to comment on this page.