Name: __________________
Pre-lab Quiz
-
Consider the following code:
String firstName = “Edsger”, lastName = “Dijkstra”;
String fullName = lastName + “, “ + firstName;
int n = fullName.length();
What is the value of n?
-
“Strings are immutable” means.
[ ] They can not be changed
[ ] They can not be converted to integers
[ ] They can not be printed.
Lab Instructions
Getting Started
-
Create a project called Password
-
Import the files from R:\Ap Java\Projects\Lab5 Password
-
Edit the file Password.java
Assignment
-
Your program will read in a line of data from the user. You can assume the input is a person's first and last name
-
Your program will print out the person's Middletown email address; the name is the person's last name followed by this or her first initial. The domain is middletownk12.org
- You will also print out the person't recommended password, which is the first four letters of their last name, in all lower case, followed buy the first four letters of their first name, in all upper case. Any instance of a o will be replaced with a zero. In other words, the default password for "Robert Moses" is "m0seR0BE"
Wrap-up
-
Print our your source code
-
Hand in your source code with your grade sheet.
Grading
|
|
Points
|
Extra
|
Correct
|
Incorrect
|
|
Quiz
|
2
|
|
|
|
|
Input
|
1
|
|
|
|
|
Print length
|
1
|
|
|
|
|
Cut word
|
3
|
|
|
|
|
Asterisks
|
2
|
|
|
|
|
Caps
|
1
|
|
|
|
|
|
|
|
|
|
|
Fails to compile
|
-1
|
|
|
|
|
Late
|
-1
|
|
|
|
|
Total
|
10
|
|
|
|
Comments
Comments (0)
You don't have permission to comment on this page.