Details of this Paper

DEVRY CIS170B all weeks ilabs [ all 7 weeks ]

Description

solution


Question

Question;PrintiLab 1 of 7: Getting Started (Your First C# Programs) - (45 points)Note!Submit your assignment to the Dropbox located on the silver tab at the top of this page.(See the Syllabus section "Due Dates for Assignments & Exams" for due dates.)Remember This!Connect to the iLab here.iLAB OVERVIEWScenario and SummaryWelcome to Programming with C#. The purpose of this three-part lab is to walk you through the following tutorial to become familiar with the actions of compiling and executing a C# program.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:How to create a projectHow to enter and save a programHow to compile and run a programGiven a simple problem using input and output, be able to code and test a program that meets the specifications.Be able to debug a simple program of any syntax and logic errors.Your 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: Getting StartedStep 1:Start the ApplicationLocate the Visual Studio 2010 icon and double click to open. Under Applications, click on the Microsoft Visual Studio.NET 2010 icon to open the C# software.Step 2:Create a C# Console ProjectChoose File->New Project, and click Console Application. In the project name box, enter LAB1A. Your screen should look like the screen below. If so, press the OK button.Step 3:Delete All Code in Program.csYour screen should now look like what you see below. Now, highlight all of the code that you see [Ctrl + A] and press the Delete key. You will not need this code because you will now be getting experience writing every line of a new program.Step 4:Type in ProgramNow enter the following C# program exactly as you see it. Use the tab where appropriate. (Note: C# is case sensitive.) Instead of John Doe, type your name.class Hello{static void Main(){// display outputSystem.Console.WriteLine("John Doe"),System.Console.WriteLine("CIS170B ? Programming using C#"),System.Console.WriteLine("\n\n\nHello, world!\n\n"),System.Console.WriteLine("EOJ"),System.Console.ReadLine(),}}Step 5:Save ProgramSave your program by clicking File on the menu bar and then clicking Save Program.cs, or by clicking the Save button on the toolbar or Ctrl + S.Step 6:Build SolutionTo compile the program, click Debug on the menu bar and then click the Build Solution or Build LabAoption. You should receive no error messages in the Error List window below the program. If you see some error messages, check the code above to make sure you didn't key in something wrong. You can double click on each error message to better navigate to the area where the problem might be. Once you make your corrections to the code, go ahead and build the solution again.Step 7:Execute the ProgramOnce you have no compile errors, to execute or run your program, either:click Debug on the menu bar, and then Start Debuggingclick the right arrow icon on the menu bar, orpress the F5 key.Step 8:Capture the OutputPrint a picture of your screen output. (Do a print screen and paste this into your MS Word document.)Step 9: Print the Source CodeCopy your source code and paste it into your Word document.End of Part APart B: Calculate Total TicketsStep 1:Create New ProjectMake sure you close your previous program by clicking File >> Close Solution. Now, create a new project and name it LAB1B.Step 2:Type in ProgramLike before, delete the code that is automatically created and enter the following program. Type in your name for Developer and current date for Date Written.// ---------------------------------------------------------------// Programming Assignment:LAB1B// Developer:________________________// Date Written:________________________// Purpose:Ticket Calculation Program// ---------------------------------------------------------------using System,class FirstOutputWithUsing{static void Main(){// create variables and load valuesint childTkts, adultTkts, totalTkts,childTkts = 3,adultTkts = 2,// process (calculation)totalTkts = childTkts + adultTkts,// display outputConsole.WriteLine(totalTkts),// pauseConsole.Write("\nPress Enter to continue..."),Console.ReadLine(),}}Step 3:Save ProgramSave your program by clicking File on the menu bar and then clicking Save Program.cs, or by clicking the Save button on the toolbar or Ctrl + S.Step 4:Build SolutionTo compile the program, click Build on the menu bar and then click the Build Solution or Build LabBoption. You should receive no error messages. If you see some error messages, check the code above to make sure you didn't key in something wrong. Once you make your corrections to the code, go ahead and click Build >> Build Solution again.Step 5:Execute the ProgramOnce you have no syntax errors, to execute or run your program, click Debug on the menu bar and then click Start Debugging.Step 6:Comment the ProgramGo back to the editor and insert meaningful comments that show that you understand what each line of code does.Step 7:Capture the OutputRun the program again.Capture a screen print of your output. (Do a PRINT SCREEN and paste into your MS Word document.)Copy your commented code and paste it into your documentEnd of Part BPart C: Payroll ProgramStep 1:Create a New ProjectMake sure you close your previous program by clicking File >> Close Solution.Create a new project and name it LAB1C.This time, do not delete the code that gets automatically created. Instead, insert your code right between the curly braces, as illustrated below.static void Main(string [] Args){// your code goes here!}Include a comment box like what you coded in Part B at the very top of your program.Step 1a:Write Your Own ProgramWrite a program that calculates and displays the take-home pay for a commissioned sales employee after deductions are taken. The employee receives 7% of his or her total sales as his or her gross pay. His or her federal tax rate is 18%. He or she contributes 10% to his or her retirement program and 6% to Social Security. Use the Processing Logic provided in Step 2 below as a guide. The program's output should look something like this:Enter weekly sales:28,000Total sales:$28,000.00Gross pay (7%):$1,960.00Federal tax paid:$352.80Social security paid:$117.60Retirement contribution:$196.00Total deductions:$666.40Take home pay:$1,293.60Press any key to continue.Step 2:Processing LogicBasic Logic and FlowchartInput: Prompt the user for the weekly sales.Process: Perform the calculations. The employee receives 7% of his or her total sales as his or her gross pay. His or her federal tax rate is 18%. He or she contributes 10% to his or her retirement program and 6% to Social Security.Output: Display the results.Pseudocode:Declare variablesAccept Input ? weeklySalesCalculate Gross Pay = Weekly Sales *.07Calculate Federal Tax = Gross Pay *.18Calculate Social Security = Gross Pay *.06Calculate Retirement = Gross Pay *.10Calculate Total Deductions = Federal Tax + Social Security + RetirementCalculate Total Take Home Pay = Gross Pay ? Total DeductionsDisplay the following on separate lines and format variables with $ and decimal1. Total Sales Amount:value of weekly sales2. Gross Pay (.07):value of gross pay3. Federal Tax paid (.18):value of federal tax4. Social Security paid (.06):value of social security5. Retirement contribution (.10):value of retirement6. Total Deductions:value of total deductions7. Take Home Pay:value of take home payStep 3:Save ProgramSave your program by clicking File on the menu bar and then clicking Save Program.cs, or by clicking the Save button on the toolbar or Ctrl + S.Step 4:Build SolutionTo compile the program, click Debug on the menu bar and then click the Build Solution or Build LabCoption. You should receive no error messages. If you see some error messages, check the code above to make sure you didn't key in something wrong. Double-click on an error to navigate to its location in the code. Once you make your corrections to the code, go ahead and click Debug >> Build Solution again.Step 5:Execute the ProgramOnce you have no syntax errors, to execute or run your program, click Debug on the menu bar and then click Start Debugging, or press the right arrow icon or the F5keyStep 6:Capture the OutputCapture a screen print of your output. (Do a PRINT SCREEN and paste into your MS Word document.)Copy your commented code and paste it into the Word document.End of Part CEND OF LABAfter you have completed your lab, complete the following for each part of the lab (if there are multiple parts).Capture a screen print of your output. (Do a PRINT SCREEN and paste into an MS Word document.)Copy your code and paste it into the same MS Word document that contains the screen print of your output.Save the Word document as CIS170B_Lab01_B_LastName_FirstInitial.docx.Upload all three projects folder and save the compressed file as CIS170B_Lab01_B_LastName_FirstInitial.Zip.Submit both the compressed project file and the Word document to the weekly Dropbox for this lab.Zipping and Submitting Your Project FilesWhen you submit your project files, you will want to send the entire project folder that is created by MS Visual Studio when you create the project, along with your MS Word file. Use your favorite compression tool to zip the full contents of both projects, zip the single zip file, and submit the zip file to your Dropbox.The following illustrates how to zip up a sample project folder using Winzip.If you do not have a compression tool, you can use the Windows Explorer "Send to Compressed (zipped) Folder" command by performing the following steps. Select the folder(s)Right clickSelect "Winzip"Expand the right arrowSelect "Add to folder name.zip"Submit the resulting folder to iLab DropboxSelect the folder(s)Right clickSelect "Send to"Expand the right arrowSelect "Compressed (zipped) Folder"Select the name and location of the resulting compressed folderSubmit the resulting folder to iLab DropboxPrintLab 2 of 7: Decisions - (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, pleaseclick here.Remember This!Connect to the iLab here.iLAB OVERVIEWScenario and SummaryYou will code, build, execute, debug, and test two programs using decision structures. The first program will calculate the shipping charge based on a given purchase amount. The second program translates a given TV channel to its call sign.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 design program logic using either a flowchart or pseudocodeTo be able to define and use data typesTo be able to prompt the user for inputTo be able to use the assignment statement for calculationsTo be able to display output to the console in a formatted mannerTo be able to debug a program of syntax and logic errorsTo be able to make decisionsYour 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 2Part A: Calculate Shipping ChargeRequirementsYour mission: Write a program that gets the amount of a purchase from the user and then calculates the shipping charge, based on the following table:$0.00 - $250.00:$5.00$250.01 - $500.00:$8.00$500.01 - $1,000.00:$10.00$1,000.01 - $5,000.00:$15.00over $5,000.00:$20.00Sample output from program:Enter a purchase amount to find out your shipping charges.Please enter the amount of your purchase: 234.65The shipping charge on a purchase of $234.65 is $5.00.Press any key to continue...TipsBest practice: Put yourself in the place of the program. What questions would you ask a customer in order to get the best input? How would you determine the correct shipping charges if you had to make the decisions yourself? Write out the questions you would ask yourself on paper as pseudocode and/or in Visual Studio as C# comments, and then implement them one by one, testing as you go. Remember to not write too much at one time. Always add and test functionality incrementally!You can use the pseudocode below as a guide:Prompt the user for the sale amountIs sale amount greater than $5,000.00?If so, shipping is $20.00If not, is sale amount greater than $1,000.00?If so, shipping is $15.00If not, is sale amount greater than $500.00?If so, shipping is $10.00If not, is sale amount greater than $250.00?If so, shipping is $8.00If not, is sale amount greater than $0.00shipping is $5.00If notshipping is $0.00If shipping is $0.00Display "Error incorrect input"If notDisplay sale amount and shipping chargenPart B: TV Channel to Call SignRequirementsYour mission: Write a program that translates a TV channel (1 through 10) in your area to its respective call sign. For example, in the New York metropolitan area, channel 2 translates to WCBS. If a channel is unused in your area, tell the user that this is the case.Sample output from program:Translate TV Channel Number to Call SignEnter channel number: 1Channel 1 is undesignated in your areaEnter channel number: 2Call sign for channel 2 is WCBSEnter channel number: 6Call sign for channel 6 is WRNNDTTipsBest practice: Put yourself in the place of the program. What steps would you personally need to perform in order to process a channel translation 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. 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 variables for channel and call signGet channel number from userUse appropriate decision structure to translate number to call signIf number is valid in areaPrint out translationPrintiLab 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, pleaseclick 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-LoopiLab 4 of 7: Methods - (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, pleaseclick here.Remember This!Connect to the iLab here.iLAB OVERVIEWScenario and SummaryYou will code, build, and execute a program that simulates the dialing of a phone using methods.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:Distinguish between by value, by ref, and out parameter types.Call class methods using by value, by ref, and out parameters.Write your own class methods using by value, by ref, and out parameters.To be able to define and use global named constantsTo 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 StepsStep 1:Requirements - Phone Dialing ProgramYour mission: A prepaid phone service needs a program that converts alphanumeric keyboard input into a phone number. The user will input eight characters and the program will output either an error message or the translated seven-digit phone number. The input may contain digits, letters, or both. Letters can be uppercase or lowercase.The program will perform the conversion per a standard telephone keypad layout.05J K L16M N O2A B C7P Q R S3D E F8T U V4G H I9W X Y ZThe program implements the following methods.Main(): Declares seven character variables and passes these to the following methods by reference: ProcessInput(): gets user input and performs the conversion ShowResults(): displays the resultsGetInput(): Gets seven characters from the user and stores them into the seven variables Main() has passed by reference.ProcessInput(): Calls ToDigit() for each, passing each character variable by reference, and returns one of these codes to Main() by value: 0 if there were no input errors -1 if there were input errorsInput errors include the following:The first character is 0 (seven-digit phone numbers can't start with 0). The first three characters are "555" (no phone numbers start with 555). Any character is not a digit or an uppercase or lowercase letter.ToDigit(): Converts a character (passed by reference) to its corresponding digit per the table above, and returns one of these codes to ProcessInput() by value: 0 if the character is valid (a digit or uppercase or lowercase letter) -1 if the character is not validShowResults(): Writes converted telephone number to the screen, inserting a dash (-) between the third and fourth digits, and accepts the seven character variables from Main() by reference.Sample Output:Enter a 7 character phone number: 2132121The converted phone number is: 213-2121Enter a 7 character phone number: 2scdfERThe converted phone number is: 272-3337Enter a 7 character phone number: 555reswInvalid input, please try again.Enter a 7 character phone number: 0988765Invalid input, please try again.Enter a 7 character phone number: 12345678Invalid input, please try again.Enter a 7 character phone number: @34*uyInvalid input, please try again.TipsBest practice: Don't try to write too much at a time! First, write an outline in comments based on the requirements and the pseudocode. Then, implement declaring seven char variables. Make sure to fix any compiler errors before implementing more. Then, write and call an empty GetInput() method that accepts parameters, but does nothing but return a dummy value. Make sure you can pass the seven character variables by reference without compiler errors before implementing any of the GetInput() logic. Keep working incrementally like this, testing as you go. Set breakpoints and use the debugger at each phase to make sure your logic is working correctly. Then, use the same approach to implement the other methods. Test each phase with valid input before handling any invalid conditions.PseudocodeProcessInput() MethodGet 7 characters from the user and store them in the 7 variables that Main() has passed by referenceCall ToDigit() for each of the 7 charactersIf toDigit returns an error code (-1), return an error code (-1)If the first character is 0, return an error code (-1) to Main()If the first three characters are 555, return an error code (-1)If there are no errors, return 0ToDigit () MethodConvert the characters (passed from ProcessInput() by reference) to upper caseUse a switch statement to translate characters into their corresponding digits.Write a case statement for each digit and for each valid uppercase letterWrite a default case that returns an error code (-1) for invalid lettersIf there are no invalid letters, return 0ShowResults () MethodDisplay the Phone Number using the character variables Main() has passed by referenceMain() MethodDeclare 7 char variablesGet user input by calling the GetInput() method, passing it the 7 variables by referencePerform the conversion by calling the ProcessInput() method, passing it the 7 variables by referenceDisplay an error message or call ShowResults(), depending on the code ProcessInput() returnsEND OF LABPrintiLab 5 of 7: Arrays and Strings - (45 points)Note!Submit your assignment to the Dropbox located on the silver tab at the top of this page.(See the Syllabus section "Due Dates for Assignments & Exams" for due dates.)Remember This!Connect to the iLab here.iLAB OVERVIEWScenario and SummaryYou will code, build, and execute two programs requiring arrays and ArrayLists. The first program will determine statistics for a video game tournament. The second program will alphabetize a list of last names.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 Name Lab 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 arrays in a programTo be able to determine the appropriate array data type to use in a given programTo be able to write a program that implements arraysTo be able to explain the way memory is allocated for arrays in a programTo be able to explain the fact that arrays are objects in C#To be able to write a program that implements an ArrayListYour lab grade will be based upon:the formatting of your source code,the use of meaningful identifiers,the extent of internal documentationl, 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: Tournament StatsRequirementsYour mission: Write a program to determine statistics for a video game tournament. The user will input names and scores of all tournament players. The program will calculate the average score and display the players who scored below average.The program will implement these functions:Main(): Declares variables for the number of players and average score, and two arrays of size 100: one to store player names and the other to store their respective scores. Calls the following functions in sequence, passing necessary parameters by reference:InputData(): Gets player names and scores from the user and stores them into the two arrays for an unknown number of players up to 100.DisplayPlayerData(): Displays each player's name and score.CalculateAverageScore(): Calculates the average score and returns it by value.DisplayBelowAverage(): Displays the names and scores of players who scored below average.Sample output:Enter Player Name (Q to quit): BobEnter score for Bob: 3245Enter Player Name (Q to quit): SueEnter score for Sue: 1098Enter Player Name (Q to quit): DaveEnter score for Dave: 8219Enter Player Name (Q to quit): PatEnter score for Pat: 3217Enter Player Name (Q to quit): QNameScoreBob3245Sue1098Dave8219Pat3217Average Score: 3944.75Players who scored below averageNameScoreBob3245Sue1098Pat3217Press any key to continue...TipsBest practices:Don't try to write too much at a time! First, write an outline in comments based on the requirements and the pseudocode. Then, implement each function one at a time. Start each by writing a shell that just accepts data and perhaps prints it out for testing purposes. Test by calling the function from

 

Paper#36398 | Written in 18-Jul-2015

Price : $62
SiteLock