Details of this Paper





Question;PrintiLab 6 of 7: Menu-Driven Applications (GUI) - (45 points)Note!(See the Syllabus section "Due Dates for Assignments & Exams" for due dates.)Submit your assignment to the Dropbox located on the silver tab at the top of this page. For instructions on how to use the Dropbox, please click here.Remember This!Connect to the iLab here.iLAB OVERVIEWScenario and SummaryYou will code, build, and execute two programs requiring GUI. The first program will ask the user to input a password and then reenter it for verification. The second program is a number guessing game that generates a random number and asks the user to input his or her guess.DeliverablesSubmit the following to this week's Dropbox:A zipped Visual Studio project folder for each programming exercise. Refer to the Deliverables section of the Week 1 iLab page for detailed instructions on how to zip a project folder.A single MS Word file named YourLastName_Lab1_ex1.docx containing the following items:The source code for each program in the lab: Your source code should use proper indentation, include meaningful comments, and be error free. Start each with a specification that includes your name, the lab and exercise number, and a description of what the program accomplishes, similar to this:/* Specification:First Name Last NameLab 1 Exercise#This program does X */Labeled screenshot(s) of the output windows for each program, showing that each program produces correct resultsNOTE: A screenshot of a window can be created by first clicking on it to activate it. Next, press the key or key combination your specific computer uses to do a "print screen" (typically the Prnt Scrn or Prnt key in combination with the ctrl or FN key). Then, click the MS Word "paste" option to paste the screenshot into the MS Word file.Objectives and GradingLab Objectives:To be able to explain the need for menus in a programTo be able to determine ways to implement menus in a Windows applicationTo be able to understand the classes and objects used in a Windows applicationTo be able to write a Windows applicationYour lab grade will be based upon:the formatting of your source code,the use of meaningful identifiers,the extent of internal documentation, andthe degree to which an exercise's specifications are met.Preparation:If you are using the Citrix remote lab, follow the login instructions located in the iLab tab in Course Home.iLab StepsPart A: Password ProgramRequirementsWrite a Windows application that simulates entering a password. The user enters a password and clicks Next. Then, the user types the password again and clicks Continue. The program will display a Message Box that displays either that the passwords match or that they don't match.Sample output:I type in Bob in the password field and click Next.I type in Bob in the second password field and click Continue.Message displayed if the passwords match:Message displayed if the passwords are different:TipsBest practice: First make sure to read through this week's lecture and try it yourself! Then, you'll be in good shape for this exercise.Pseudocode:Next Button Event Handler MethodIf the first password textbox is not blank Make visible the second password textbox, the Done button, and the labelsElse Put "You must enter a password" in the labelEnd-IfDone Button Event Handler MethodIf the first password text box is not empty If the first password text box equals the second password textbox Display the message "Passwords are the same"Else Display the message "Passwords are different"End-IfElse Display the message "You must enter a password"End-IfEND OF PART APart B: Number Guessing GameRequirementsWrite a Windows application that randomly generates a number from 0 through 100. Prompt the user to guess the number. Let the user know if the guess is too low, too high, or is the correct number. Give the user another chance to guess the number. The user keeps guessing until he or she gets it correct.Sample output:I entered a number and pressed the button.I pressed the button and the box and message are cleared.I entered a number and pressed the button.After entering several numbers, I got the following:The following message is displayed when the guess is right.TipsPseudocode:Form constructor methodRandomly pick a target number between 0 and 100Evaluate Button Click Event Handler MethodIf the guess text box is not blank Pull the guess from the text boxAdd 1 to the number of guesses If the guess is less than the target Make the Evaluate button invisibleChange the label message to "Too Low!!"Make the label message visibleChange the background color of the form to LightSeaGreenMake the Try Again button visibleElse if the guess is greater than the target Make the Evaluate button invisibleChange the label message to "Too High!!"Make the label message visibleChange the background color of the form to SlateBlueMake the Try Again button visibleElse Display a message indicating the user guessed correctly and display the number of guesses it took.End-IfEnd-IfTry Again Button Click Event handlerClear the guess text boxMake the label message and Try Again buttons invisibleMake the Evaluate button visibleEND OF PART BEND OF LABFor instructions on how to use the


Paper#36408 | Written in 18-Jul-2015

Price : $24