Professional Documents
Culture Documents
Lab 2 Java Programmingfor Beginning Beginners 2
Lab 2 Java Programmingfor Beginning Beginners 2
2
In lab 2 you will need to write a program that will prompt the user for their name and then three
test scores. Your program should output the a line of text that looks something like “Name:
Andrew. Test scores: 88, 94, 81” With the name and test scores being replaced with the name
and scores that the user entered. You will need to store the values the user enters into
variables like we did in When completed your program's output should look like the screenshot
below.
Tips:
You will need to use a Scanner to get input from the user.
You should store the entered name in a String type variable. The score variables can be saved
in an int type variable. In Chapter 3 we will go over variables in much more depth.
Don’t forget to check for missed semicolons and brackets.
If you are getting errors when you go to compile your code, go back into your editor and make
sure you haven’t forgotten any semicolons or brackets. Then make sure you save and
recompile your code to check if your problem is solved!
Don’t worry if you try and still can’t find your error, you can watch the Lab 2 Solution video for a
step by step walk through of a possible solution.
Good Luck!