JFo 3 Practice
JFo 3 Practice
JFo 3 Practice
Tasks
Copyright © 2020, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.
2. As your project type, choose “Java Application” and click “Next”:
Copyright © 2020, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.
2
Part 1: Creating a JavaLibs Game.
Overview
Section 3 has shown you everything you’ll need to
recreate a JavaLibs program, similar to the one you
played at the beginning of the section. It may take a
bit of thinking, but it’s a challenge you’re definitely
ready for. Your program requirements are described
below. Good luck, and have fun!
Tasks
Your goal is to create a program similar to JavaLibs. Write a story where certain parts of the resulting story
text are modified by the user’s input. Prompt the user for various inputs.
You may accept user any number of ways, including a JOptionPane, or Scanner input from the console.
However, choose only one method. Don’t use multiple methods of accepting input. Similarly, if you use
JOptionPane to get input, use JOptionPane to show the resulting story.
When you output your story, make sure your all your text is visible at the same time. It’s not ok for text to be
too long for your computer screen or output window. Your story will need to be spread across several lines
instead of being printed in one giant line of output. This helps keep your output clean and your program more
user friendly.
It’s ok for your program to crash if the user inputs inappropriate data. In other words, It’s ok if your program
crashes because you’ve expected the user to input a number, when they’ve instead input a String. We’ll
cover exception handling later in the course.
It’s ok for this problem set to write your entire program within the main method.
Copyright © 2020, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.