Program which incorporates a try-catch block to error check

Assignment Help Basic Computer Science
Reference no: EM13951250

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?"

Reference no: EM13951250

Questions Cloud

Find the value of the linear correlation coefficient r : Compare the computed linear correlation coefficient r to the critical value of r at the 5% significance level to determine whether there is a linear correlation between the two characteristics. Does the slope of the regression line appear to indic..
Analyze the potential liability of the united states : It is a quiet predawn morning in the Seattle, WA area and the lone FAA air traffic controller. Analyze the potential liability of the United States and the controller for the accident.
Develop an annual report for a company : Develop an Annual Report for a Company of your choice. Visit the corporate website, examine the annual statement and investor information and develop a comprehensive analysis; Write a full analysis of the company and suggest possible strategic altern..
Program which incorporates a try-catch block to error check : 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
Pacemaker or implantable defibrillator : Locate the subheading "Pacemaker or Implantable Defibrillator" following the "Heart and Pericardium" heading in the CPT manual, read the special notes and guidelines provided and identify how electrodes may be inserted.
Value creation process for a firm : As part of any marketing activity, advertising plays a critical role in the value creation process for a firm. Critically examine the important elements of a firm's communication strategy.
What are the three generations of knowledge management : What are the three generations of knowledge management to date? What was the primary focus of each? What are the different types of roles required for each of the above three generations
Concept of social responsibility : EvaluateCohen's (2009) article on social responsibility. Consider how his perspectivealigns with those of classic management experts Drucker and Friedman. The taskis to respond to the following prompts in a paper: Define the concept of social resp..

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Identifies the cost of computer

identifies the cost of computer components to configure a computer system (including all peripheral devices where needed) for use in one of the following four situations:

  Input devices

Compare how the gestures data is generated and represented for interpretation in each of the following input devices. In your comparison, consider the data formats (radio waves, electrical signal, sound, etc.), device drivers, operating systems suppo..

  Cores on computer systems

Assignment : Cores on Computer Systems:  Differentiate between multiprocessor systems and many-core systems in terms of power efficiency, cost benefit analysis, instructions processing efficiency, and packaging form factors.

  Prepare an annual budget in an excel spreadsheet

Prepare working solutions in Excel that will manage the annual budget

  Write a research paper in relation to a software design

Research paper in relation to a Software Design related topic

  Describe the forest, domain, ou, and trust configuration

Describe the forest, domain, OU, and trust configuration for Bluesky. Include a chart or diagram of the current configuration. Currently Bluesky has a single domain and default OU structure.

  Construct a truth table for the boolean expression

Construct a truth table for the Boolean expressions ABC + A'B'C' ABC + AB'C' + A'B'C' A(BC' + B'C)

  Evaluate the cost of materials

Evaluate the cost of materials

  The marie simulator

Depending on how comfortable you are with using the MARIE simulator after reading

  What is the main advantage of using master pages

What is the main advantage of using master pages. Explain the purpose and advantage of using styles.

  Describe the three fundamental models of distributed systems

Explain the two approaches to packet delivery by the network layer in Distributed Systems. Describe the three fundamental models of Distributed Systems

  Distinguish between caching and buffering

Distinguish between caching and buffering The failure model defines the ways in which failure may occur in order to provide an understanding of the effects of failure. Give one type of failure with a brief description of the failure

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd