View
 

Lab 9: Password II

Page history last edited by Mr. Kretsch 6 months, 1 week ago

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

  1. Open your Password project.
  2. Import the files from Lab 9 Password II lab
  3. Modify the Repeat class as follows:
    1. 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.
    2. Create a password out of the name using the same rules as in the password lab.

Extra Credit:

  1. 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.