Purchase Solution

Java Programming - GUI Program

Not what you're looking for?

Ask Custom Question

Write a GUI program which incorporates a try-catch block to error check your input for integers and alphabetic characters other than Y or N. Your program must include two interactions. Each interaction will ask the user at least two questions, both of which require a yes/no response (Y or N). The program flow will depend on both user responses. Your program must include at minimum an OK and Exit button. You cannot have a Yes/No button as the user must be able to type Y or N in the GUI. See the document below for more information:

I will explain how the program is to work. The idea is to create a simple artificial intelligence program.

1. Must be a GUI
2. Must employ at minimum one try-catch block.
3. Must include two distinct interactions with at least two questions each.
4. Must include a OK, Exit (and optional a Continue button)

Example of Interaction #1:

Your Program Asks the User:

Q#1: "Do you like red wine?" User answers Y or N (if anything other is entered like "A" or -99 your program needs to catch it and reply with the appropriate error message to the user and allow the interaction to continue).

Q#2 is based on first answer being Y. If it was N you would need to ask a different question.

Q#2: "My favorite red wine is Shiraz. Is it yours?" User answers Y or N
You need at least two questions per interaction (if you want to make your code more intelligent you can). Your program at this point should ask the user if they wish to continue with a new interaction or simply have a continue button.

Example of Interaction #2 (with more than two questions):

Q#1: "Do you have a favorite partial information zero sum game?" User Answers Y

Q#2: "Is it a poker game?" User Answers Y

Q#3: Is it Texas Hold'em?" User Answers Y or N

If the answer to Q#2 is N your program might respond with: "Is the game War?"

Purchase this Solution

Solution Summary

The attachment for this solution has a zip file. It will have the form file and java file. You need to compile it with javac before using the program.

Purchase this Solution


Free BrainMass Quizzes
Word 2010: Tables

Have you never worked with Tables in Word 2010? Maybe it has been a while since you have used a Table in Word and you need to brush up on your skills. Several keywords and popular options are discussed as you go through this quiz.

C++ Operators

This quiz tests a student's knowledge about C++ operators.

Basic UNIX commands

Use this quiz to check your knowledge of a few common UNIX commands. The quiz covers some of the most essential UNIX commands and their basic usage. If you can pass this quiz then you are clearly on your way to becoming an effective UNIX command line user.

Word 2010: Table of Contents

Ever wondered where a Table of Contents in a Word document comes from? Maybe you need a refresher on the topic? This quiz will remind you of the keywords and options used when working with a T.O.C. in Word 2010.

Inserting and deleting in a linked list

This quiz tests your understanding of how to insert and delete elements in a linked list. Understanding of the use of linked lists, and the related performance aspects, is an important fundamental skill of computer science data structures.