Details of this Paper





Question;PrintiLab 3 of 7: Looping - (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 design, code, build, execute, and debug a program that will use looping to determine the final score of dives based on individual judges' scores as well as a given dive's degree of difficulty.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 part/exercise: 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) demonstrating that each exercise 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:Become familiar with the different types of looping structures.To be able to debug a program of syntax and logic errorsTo be able to use the debug step-into feature to step through the logic of the program and to see how the variables change valuesYour 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:Requirements - DIVE Scoring ProgramYour mission: The state diving commission wants to computerize the scoring at its diving competitions. You've been hired to write a program to automate the scoring of dives. Following are the requirements for the program.After each dive, the user will be prompted to enter the:diver's name,diver's city,degree of difficulty (ranges from 1.00 to 1.67), andscores from five judges (scores can range from 0 to 10).If an invalid score is entered, an error message will be displayed. The user will be prompted for the score repeatedly until a valid score is entered.The program will then display the following information:Diver's nameDiver's cityDive final score: This is calculated by dropping the highest and lowest of the five judges' scores. The remaining three scores are added together, and the result is divided by 3 and then multiplied by the degree of difficulty.The program will then prompt the user if she/he wants to process another dive. The user can type "Y" or "y" to continue, and "N" or "n" to quit.Sample output:Diver's name: Sue JonesDiver's city: DallasDive degree of difficulty: 1.9Invalid degree of difficulty - Please reenter (Valid Range: 1 - 1.67)Dive degree of difficulty: 2Invalid degree of difficulty - Please reenter (Valid Range: 1 - 1.67)Dive degree of difficulty: 1.2Judge #1 score: 45Invalid score - Please reenter (Valid Range: 0 - 10)Judge #1 score: 3Judge #2 score: 4.5Judge #3 score 6.7Judge #4 score 89Invalid score - Please reenter (Valid Range: 0 - 10)Judge #4 score 8Judge #5 score: 9.2Diver: Sue JonesCity: DallasDive score: 7.68Do you want to process another dive (Y/N)? yDiver's name: Dave SmithDiver's city: HoustonDive degree of difficulty: 1.1Judge #1 score: 5.7Judge #2 score: 6.8Judge #3 score:: 7.6Judge #4 score: 8.7Judge #5 score: 6.7Diver: Dave SmithCity: HoustonDive score: 7.74Do you want to process another diver (Y/N)? NTipsBest practice: Note that a good way to implement the code is to write a first version for only a single dive without validating input. Put yourself in the place of the program. What steps would you personally need to perform in order to process a single dive yourself? Write out those steps on paper as pseudocode and/or in Visual Studio as C# comments, and then implement them one by one, testing as you go. After you have a single dive process working, implement one of the input validations, or the outer loop that repeats the whole process. Whichever you choose, remember to not write too much at one time. Always add and test functionality incrementally!Pseudocode:Although there are several valid ways to write the program, the following is an outline of one way to design the overall logic.Declare and initialize variables: name, city, judge score, highest score, lowest score, total scoreLoop while there are dives to processGet diver's name and cityGet degree of difficultyLoop to validate inputEnd LoopLoop five times to get judges' scoresLoop to Validate inputEnd LoopUpdate highest and lowest scores if need beAdd score to total scoreEnd Loop Calculate the final score (subtract highest and lowest scores from total score, divide by 3, multiply by degree of difficulty) Display the diver's information and final dive scorePrompt the user if he or she wants to process another diveEnd-LoopFor instructions on how to use the Dropbox


Paper#36406 | Written in 18-Jul-2015

Price : $24