{"id":208861,"date":"2018-09-14T09:26:07","date_gmt":"2018-09-14T09:26:07","guid":{"rendered":"http:\/\/localhost\/wordpress\/index.php\/2018\/09\/14\/cmis-102-week-6-hands-on-lab\/"},"modified":"2018-10-24T08:51:35","modified_gmt":"2018-10-24T08:51:35","slug":"cmis-102-week-6-hands-on-lab","status":"publish","type":"post","link":"https:\/\/www.benedictsol.com\/blogs\/cmis-102-week-6-hands-on-lab\/","title":{"rendered":"CMIS 102 Week 6 Hands-On Lab"},"content":{"rendered":"<p>CMIS 102 Week 6 Hands-On Lab\tOverview\tThis 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 uses sequential, repetition statements and nested repetition statements.\tProgram Description\tThis program will calculate the average of 3 exams for 5 students. The program will ask the user to enter 5 student names. For each of the students, the program will ask for 3 exam scores. The average exam score for each student will be calculated and printed.\tAnalysis\tI will use sequential and repetition programming statements.\tI will define one String to store the student name: StudentName.\tI will define three Float numbers: Examvalue, Sum, Avg to store exam values the sum of the exams and the average of the exams.\tThe sum will be calculated by this formula:\tSum = Sum + Examvalue\tFor example, if the first value entered was 80.0 and second was 90.0 and the third exam was 100.0: sum = sum + Examvalue = 0.0 + 80.0\tsum = 80.0 + 90.0 = 170.0\tsum = 170.0 + 100.0 = 270.0\tAvg is then calculated as:\tAvg = sum\/3.0\tFor example 270.0\/3.0 = 90.0\tA nested repetition loop can be used to loop through each of the 5 students and each of the 3 exams:\tFor (students=0; students <5; students++) For (exams=0;exams<3;exams++) End For End For Sum values will need to be reset for each student to ensure only one student data is used for calculations each time.Test Plan\tTo verify this program is working properly the input values could be used for testing:\tLearning Exercises for you to complete\t1. Modify the code to be able to input an undetermined number of students. You will still only have 3 exams for each student. 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 is the line of code doing?\tcharStudentName[100];\t(Hint: We haven't covered arrays, but a String can be thought of as an array of characters) ?\t4. What would happen if you moved the Set Sum = 0.0 from inside the for loop to right after the declaration. For example:\t\/\/ Declare variables\tDeclare StudentName as String Declare ExamValue, Sum, Avg as Float\t\/\/ Initialize Sum Set Sum = 0.0;\tSupport your experimentation with screen captures of executing the new code.\n<\/p>\n","protected":false},"excerpt":{"rendered":"<p>CMIS 102 Week 6 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-6-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-208861","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/www.benedictsol.com\/blogs\/wp-json\/wp\/v2\/posts\/208861","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=208861"}],"version-history":[{"count":0,"href":"https:\/\/www.benedictsol.com\/blogs\/wp-json\/wp\/v2\/posts\/208861\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.benedictsol.com\/blogs\/wp-json\/wp\/v2\/media?parent=208861"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.benedictsol.com\/blogs\/wp-json\/wp\/v2\/categories?post=208861"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.benedictsol.com\/blogs\/wp-json\/wp\/v2\/tags?post=208861"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}