Homework 01
Choose Your Own Adventure!
Due 09/12/2025 by 11:55PM
Objective:
Write a program that allows the user
to play a “Choose Your Own Adventure” game. In this game the user will be
prompted with making decisions, which will then lead
them to different paths with different results until they reach the end.
Requirements:
- Functionality. (80pts)
- No Syntax, Major
Run-Time, or Major Logic Errors. (80pts*)
- *Code that cannot be
compiled due to syntax errors is nonfunctional code and will receive no
points for this entire section.
- *Code that cannot be
executed or tested due to major run-time or logic errors is
nonfunctional code and will receive no points for this entire section.
- There must be 9
different endings. (20pts)
- Each ending requires
at least 2 decisions.
- 3 of the 9 endings requires at least 3 decisions.
- All must apply for
full credit.
- Variety of Decisions.
(60pts)
- There must be at least
one branching statement that has a numeric comparison, such as “equal
to”, “strictly less than”, etc. (20pts)
- There must be at least
one branching statement that has a String comparison. (20pts)
- There must be at least
one branching statement that has a compound Boolean expression. (20pts)
- Be creative! Don’t be
vulgar or offensive (100pts*)
- *Content deemed vulgar or offensive will result in an automatic 0 for
the assignment.
- *A code of conduct
violation will be reported to the Office of Student Conduct for further
review and sanctions.
- *If there are
questions about content, then you should ask the instructor before
submitting the assignment.
- Coding Style. (10pts)
- Readable Code
- Meaningful identifiers
for data and methods.
- Proper indentation
that clearly identifies statements within the body of a class, a method,
a branching statement, a loop statement, etc.
- All the above must
apply for full credit.
- Comments. (10pts)
- Your name in the file. (5pts)
- At least 5 meaningful
comments in addition to your name. These must describe the function of
the code it is near. (5pts)
Example Dialog:
*The following Example Dialog
demonstrates the interactions between a user and ONE possible implementation
of the required software’s front-end / user interface. The software’s
front-end / user interface may be implemented in MANY
different ways and will receive full credit as
long as it meets the most minimal of the above requirements. While you
may use the example dialog as a guide, it is strongly encouraged to create the
front-end / user interface in your own way. *
|
Key
|
|
Unhighlighted
Text
|
Program’s
Output
|
|
Highlighted Text
|
User’s Input
|
Welcome to the land of Donkeydwarf! Will you go to the
inn, look for trouble, or talk to the shady looking
elf standing near the entrance? Enter “inn”, “trouble”, or “elf”.
INN
You enter the musty inn and approach the inn keeper. “Aye you looking to rent a room? Yes or No?”,
she rasps.
Yes
“The cheap rooms are filled up, but if you do me a favor, then
I’ll let you have a nice suite.” Enter true or false.
true
“There’s this dragon ya see. He
stole all my pickles. I want him to pay! Go make him pay!” You
venture out and find the pickle pilfering dragon. The dragon will give
you the pickles if you guess the number it is thinking between 1 and 10. Enter that number.
5
“That was not the number I thought of”. The dragon roasts
you alive and you are consumed with the rest of the stolen pickles. THE
END.
Finally:
- Upload the source code
file or files (.JAVA File Extension) to Homework01
- To Blackboard
- Following these instructions.
- If there are problems,
then let the instructor know as soon as possible.