Question
In our Software Development lessons, we noted that planning the program was one of the first steps. You'll get a little practice with creating a
In our Software Development lessons, we noted that planning the program was one of the first steps. You'll get a little practice with creating a very small graphical user interface (GUI - pronounced 'goo - ee') in this assignment.
You'll also get to meet one of our favorite YouTubers Alex Lee. whether you like to learn from videos or not, is a great resource to help learn Java.
Now, let's get started. For this assignment, you will create a program that tells the answer to a riddle. The idea for this came from a school assignment years ago and it was so much fun that we wanted to share it with you.
The plan in pseudocode:
Start Riddle program Window opens with riddle User reads riddle User clicks button User reads answer End Riddle program
Okay, now to learn the technical part of creating a windows program (GUI) instead of our usual black and white text (console) programs, let's defer to Alex Lee's video "Java GUI Tutorial - Make a GUI in 13 Minutes".
Remember that if you have any problems or questions, please use the Course Help Discussion to get help from your classmates before asking your teacher.
Follow along with Alex's video to complete the program in full. His instruction will have you complete a GUI program with a counter to keep up with how many times the button is clicked (button event).
Do NOT forget to cite the website/webpage where you found the tutorial to avoid plagiarism (even if we directed you there).
You may use the APA or MLA style of citation in this course.
Cite the website/webpage in the comments at the top of the java file under your name.
Once completed, make a copy of the program (just go to the folder you saved your GUI.java and make a copy) and name the new copy Riddle.java.
Open the new file Riddle.java in your Java IDE and modify it with these requirements.
If you don't have a favorite riddle already, research riddles online and find a fun (school appropriate) one to use for the program.
Instead of a counter showing how many times the button was clicked, your new program will
Open and show the riddle question in its entirety (user should not have to scroll or resize your window).
When the user clicks the button, riddle question will disappear and the answer will appear (user should not have to scroll or resize your window).
The original count should no longer show when running the program.
Add your name and the name of the program in the comments at the top of the java file.
Add comments to show where you made the changes and to explain what the changes do.
Create a new word processing document named S06GUI with your last name and first initial, i.e. S06GUISmithD.
Insert screenshots of your finished program when it shows the riddle and when it shows the answer after the button is clicked.
Open your original GUI.java and take screenshots to insert into your document.
Take a screenshot of your original program code (click the buttons a few times to show that it worked).
Take a screenshot showing the working counter program.
Make sure to label the page in the document if you need more than one screenshot and page to show your code to help your teacher distinguish your GUI.java from your Riddle.java.
Open your Riddle.java if it's not already open.
Take a screenshot of your Riddle.java code showing the full code, including your modifications including your comments.
Take a screenshot of your working program showing the riddle and the answer at different parts in the program.
Insert into your document.
What did you think of this assignment? Add your reflection to your S06GUI document and let us know your opinion of this assignment. Did you get frustrated? Did you have fun? Which part was the hardest? Did it seem easy?
Save/download/export your S06GUI document as a pdf.
Submit the pdf to this assignment dropbox.
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