{"id":208867,"date":"2018-09-14T09:26:18","date_gmt":"2018-09-14T09:26:18","guid":{"rendered":"http:\/\/localhost\/wordpress\/index.php\/2018\/09\/14\/cmis-102-week-7-hands-on-lab\/"},"modified":"2018-10-24T08:50:27","modified_gmt":"2018-10-24T08:50:27","slug":"cmis-102-week-7-hands-on-lab","status":"publish","type":"post","link":"https:\/\/www.benedictsol.com\/blogs\/cmis-102-week-7-hands-on-lab\/","title":{"rendered":"CMIS 102 Week 7 Hands-On Lab"},"content":{"rendered":"<p>CMIS 102 Week 7 Hands-On Lab\tOverview\tThis hands-on lab allows you to follow and experiment with the critical steps of developing a program\tincluding the program description, analysis, test plan, design, and implementation with C code. The\texample provided uses sequential, repetition, selection statements and two user-defined function.\tProgram Description\tThis program will provide options for a user to calculate the square or cube of a positive Integer input by a user. The program will prompt the user to enter an Integer and then prompt the user if they want to\tcalculate the square of the cube of the number. Based on the inputs of the user, the program will output\tthe square of the cube of the positive integer. The program will then print the Integer and square or cube of the integer based on the user&#8217;s original choice. The program will continue to prompt the user for\tIntegers and their calculation choice until the user enters a negative integer. The square and cube calculations should be calculated using a function.\tAnalysis\tI will use sequential, selection, and repetition programming statements and functions for the cube and\tsquare calculations. I will define three Integer numbers: IntValue, MenuSelect, Results to store the Integer value input by the user, the Menu selection (1 for Square, 2 for Cube) of the user, and the results of the Square or Cube functions.\tThe Square function will take one Integer as input and return one Integer as the output. The calculation within the Square function is: Results = IntValue * IntValue\tFor example: if 10 was entered as the IntValue. Results = 10*10 = 100\tThe Cube function will take one Integer as input and return one Integer as the output. The calculation\twithin the Cube function is: Results = IntValue * IntValue*IntValue\tFor example: if 10 was entered as the IntValue. Results = 10*10*10 = 1000\tA repetition loop can be used to loop through iterations until a negative is entered:\tLearning Exercises for you to complete\t1. Using the Square and Cube functions as models, Create an application that includes a function named &#8220;Shrink&#8221;\ufffd that would take an Integer and return the Integer divided by 2? (Hint: your returned value should probably be a double type.) Support your experimentation with screen captures of executing the new code.\t2. Prepare a new test table with at least 3 distinct test cases listing input and expected output for the code you created after step 1.\t3. What would happen if you removed the following code from our design? If intValue> 0 Support your argument with screen captures of executing the new code.\t4. Modify the original code and add an additional function of your choice. The function should be unique and something you created for this assignment. Support your experimentation with screen captures of executing the new code. Prepare a test table with at least 3 distinct test cases listing input and expected output for your unique function.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>CMIS 102 Week 7 Hands-On Lab Overview This hands-on lab allows you to follow and experiment with the critical steps of developing a program including the program description, analysis, test plan, design, and implementation with C code. The example provided <a href=\"https:\/\/www.benedictsol.com\/blogs\/cmis-102-week-7-hands-on-lab\/\" class=\"read-more\">Read More &#8230;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-208867","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/www.benedictsol.com\/blogs\/wp-json\/wp\/v2\/posts\/208867","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.benedictsol.com\/blogs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.benedictsol.com\/blogs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.benedictsol.com\/blogs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.benedictsol.com\/blogs\/wp-json\/wp\/v2\/comments?post=208867"}],"version-history":[{"count":0,"href":"https:\/\/www.benedictsol.com\/blogs\/wp-json\/wp\/v2\/posts\/208867\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.benedictsol.com\/blogs\/wp-json\/wp\/v2\/media?parent=208867"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.benedictsol.com\/blogs\/wp-json\/wp\/v2\/categories?post=208867"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.benedictsol.com\/blogs\/wp-json\/wp\/v2\/tags?post=208867"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}