Lab - 4
Lab - 4
Activities
Carry out the following exercises and document the respective steps with screenshots
and your own notes.
This lab exercise helps you practice looping structures in Java such as: while,
do…while, nested while, for and nested for statements, text file operations and random
numbers. By the end of this lab, you should be able to write Java programs using these
decision structures for various situations.
INSTRUCTIONS
● Please follow the steps, type your programs, and run the commands individually,
but you can discuss them with your partners/group.
● Put all your results (screenshots) numbered correctly in a text document and
submit the final version as a PDF.
● Please ensure that both the code and the output are clearly visible to read.
Textbook: Starting Out with Java, 6th Edition
Chapter: 4 - Loops and Files
Pages: 262 - 267
In-Class Exercises
Programming Challenges: 1, 4, 6, 10
Assignment