Question
Word Game (Java) Basic Steps in Creating your Program Plan your logic before working on the project and review the syntax you will use in
Word Game (Java)
Basic Steps in Creating your Program
Plan your logic before working on the project and review the syntax you will use in the project. Think about how you want the output to be displayed to the user. You might want to tell the user what the program does and what type of input you expect from the user. You interface structure could do this. Select names of the variables you will use in the program.
Create a JAVA project Using Apache NetBeans IDE. And have the code window open to write the project code. Here are some instructions on creating the project.
Declare variables to hold input information.
Using the JOptionPane Concept. (Some programs might need just the Scanner. Create the project using the ant option and leave the main() in the project creation
Ask the user to enter some information requested and save the response to a variable. This could look like: name = JOptionPane.showInputDialog (Enter your name).
Use line spacing (i.e. ) to separate lines of output to make it easy for the user to read the information and have proper line length.
Documentation: All lines of code must be documented.
Use the syntax to designate lines in code as comments (//)
These comments can be at the end of a line of code or in a group definition at the beginning of a section of code. All methods and function need a group heading document.
Run the program using Run Project menu item. Debug the code, making sure all calculations are correct and the line spacing is suitable for readability.
Program Assignment
(must use import javax.swing.JoptionPane and the inputDialog)
Write a program that plays a word game with the user. The program should ask the user to enter the following:
His or Her Name
His or her age
The name of a city
The name of a college
A profession
A type of animal
A pets name
After the user has entered these items, the program should display the following story, inserting the users input into the appropriate locations:
There once was a person names NAME who lived in CITY. At the age of AGE, NAME went to college at COLLEGE. NAME graduated and went to work as a PROFESSION. Then NAME adopted a(n) ANIMAL named PETNAME. They both lived happily ever after.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started