SlideShare uma empresa Scribd logo
1 de 10
MD University CMIS 102 Week 4 Hands on Lab
NEW
Check this A+ tutorial guideline at
http://www.assignmentcloud.com/cmis-102-
md-university-/cmis-102-week-4-hands-on-
lab-new
For more classes visit
http://www.assignmentcloud.com/
Week 4
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 (using pseudocode), and
implementation with C code. The example
provided uses sequential and selection
statements.
Program Description
This program will calculate the sum of 5 integers.
The program will ask the user to 5 integers. If the
sumof the numbers is greater than 100, a message
is printed stating the sum is over 100. The design
step will include both pseudocode.
Analysis
I will use sequential, and selection programming
statements.
I will define six integer numbers: value1, value2,
value3, value4, value5 and sum. The value1,
value2,value3, value4 and value5 variables will
store the integers input by the user. The sum will
store the sum of the 5 values.
The sum will be calculated by this formula:
sum = value1 + value2 + value3 + value4 + value5
For example, if the first values entered were value
1=1, value 2=1, value 3=2,value 4=2 and value 5=3
respectively:
sum = 1 + 1 + 2 + 2 + 3 = 9
The additional selection statement will be of this
form:
If sum > 100 then
print "Sum is over 100"
End If Test Plan
To verify this program is working properly the
input values could be used for testing:
Test Case
1 2 Input
value1=1
value2=1
value3=1
value4=0
Value5=2
value=100
value=100
value=100
value=100
value=200 Expected Output
Sum = 5 Sum = 600
Sum is over 100. 1 3 value= -100
value= -100
value= -200
value = 0
value= 200 Sum = -200 Pseudocode
// This program will calculate the sum of 5
integers.
// Declare variables
Declare value1, value2, value3, value4, value5,
sum as Integer
//Initialize Sum to 0
Set sum = 0
// Enter
Print
Input
Print
Input
Print
Input
Print
Input
Print
Input values
“Enter
value1
“Enter
value2
“Enter
value3
“Enter
value4
“Enter
value5 an Integer for value1”
an Integer for value2”
an Integer for value3”
an Integer for value4”
an Integer for value5” // Calculate sum
sum = value1 + value2 + value3 + value4 + value5
// Print results and messages
Print “Sum is “ + sum
If (sum > 100)
Printf “Sum is over 100”
End if C Code
The following is the C Code that will compile in
execute in the online compilers.
// C code
// This program will calculate the sum of 5
integers.
// Developer: Faculty CMIS102
// Date: Jan 31, XXXX
#include <stdio.h>
int main () 2 {
/* variable definition: */
int value1,value2,value3,value4,value5,sum; /*
Initialize sum */
sum = 0;
printf("Enter an Integer
scanf("%d", &value1);
printf("Enter an Integer
scanf("%d", &value2);
printf("Enter an Integer
scanf("%d", &value3);
printf("Enter an Integer
scanf("%d", &value4);
printf("Enter an Integer
scanf("%d", &value5); for
value1n");
for value2n");
for value3n");
for value4n");
for value5n"); sum = value1 + value2 +
value3 + value4 + value5;
printf("Sum is %dn " , sum );
if (sum >100)
printf("Sum is over 100n");
return 0;
}
Setting up the code and the input parameters in
ideone.com:
Note the input integer values are 100, 100, 100,
200 and 100, for this test case. You can change
these values to any valid integer values to match
your test cases. 3 Results from running within
ideone 4 Learning Exercises for you to complete
1. Demonstrate you successfully followed the steps
in this lab by preparing screen captures of you
running the lab as specified in the Instructions
above.
2. Change the C code to sum 10 integers as opposed
to 5? (Hint: Please don’t use arrays or Loops for
this. We will be using those features in another
week.) Support your experimentation with a
screen capture of executing the new code 3. Using
the code you create in step 1, modify the code to
print an additional statement if the sum of the
value is negative (Hint: Consider modifying the
existing selection statement) Support your
experimentation with a screen capture of
executing the new code. 4. Prepare a new test table
with at least 3 distinct test cases listing input and
expected output for
the code you created after step 2.
5. Create your own C code implementation of one
of the following mathematical formulas: a. y = mx +
b; (slope of a line) Assume the user will be
prompted to input m, x and b and the program will
calculate y. If the value of y is greater than 10,
inform the user the value is greater than 10.
b. a = PI * r*r; (area of circle). Assume the user will
be prompted to input the radius r. You can define
PI as 3.1416. . If the value of a is greater than 10,
inform the user the value is greater than 10.
c. v = 4/3 PI r*r*r; (volume of sphere) Assume the
user will be prompted to input the radius r. You
can define PI at 3.1416. If the value of v is greater
than 10, inform the user the value is greater than
10.
Be sure you provide not only the C code but a test
table with at least 3 distinct test cases listing input
and expected output your mathematical formula.
Submission
Submit a neatly organized word (or PDF)
document that demonstrates you successfully
executed this labon your machine using an online
compiler. You should provide a screen capture of
the resulting output.Submit all C code you created
in files.
Also, provide the answers and any associated
screen captures of your successful completion of
exercises 1, 2, 3 and 4.
Submit your document no later than the due date
listed in the syllabus or calendar.
5 Grading guidelines
Submission
Demonstrates the successful execution of this Lab
within an online compiler. Provides supporting
screen captures.
Modifies the C code to sum 10 integers as opposed
to 5.
Supports your experimentation with screen
captures of executing the code.
Using the code created in step 1, modifies the code
to print an additional statement if the sum of the
value is negative Supports your experimentation
with a screen capture of executing the new code.
Provides a new test table with at least 3 distinct
test cases listing input and expected output for the
code you created after step 2.
Creates your own unique C code implementation
of one of the provided mathematical formulas.
Provides a new test table with at least 3 distinct
test cases listing input and expected output your
mathematical formula. Supports your
experimentation with a screen capture of
executing the new
code.
Document is well-organized, and contains minimal
spelling and grammatical errors.
Total Points
2
2 2 1 2 1
10 6

Mais conteúdo relacionado

Mais procurados

Computer experiments 1^j2^j3^j4^j8^j9. d24 ^j sakshi gawade cs branch
Computer experiments   1^j2^j3^j4^j8^j9. d24 ^j sakshi gawade cs branchComputer experiments   1^j2^j3^j4^j8^j9. d24 ^j sakshi gawade cs branch
Computer experiments 1^j2^j3^j4^j8^j9. d24 ^j sakshi gawade cs branchSAKSHIGAWADE2
 
escape sequences and substitution markers
escape sequences and substitution markersescape sequences and substitution markers
escape sequences and substitution markersMicheal Ogundero
 
Oop lab assignment 01
Oop lab assignment 01Oop lab assignment 01
Oop lab assignment 01Drjilesh
 
Year 2 dsa c++ exercises on user defined functions
Year 2 dsa  c++ exercises on user defined functionsYear 2 dsa  c++ exercises on user defined functions
Year 2 dsa c++ exercises on user defined functionsErnesteNtezirizaza
 
C programming session 04
C programming session 04C programming session 04
C programming session 04Vivek Singh
 
Devry cis-170-c-i lab-5-of-7-arrays-and-strings
Devry cis-170-c-i lab-5-of-7-arrays-and-stringsDevry cis-170-c-i lab-5-of-7-arrays-and-strings
Devry cis-170-c-i lab-5-of-7-arrays-and-stringsnoahjamessss
 
C chap02
C chap02C chap02
C chap02Kamran
 
Pseudocode
PseudocodePseudocode
PseudocodeGuy09
 
2. Write a programto prompt the user to enter 2 integer values. I...
2.             Write a programto prompt the user to enter 2 integer values. I...2.             Write a programto prompt the user to enter 2 integer values. I...
2. Write a programto prompt the user to enter 2 integer values. I...hwbloom15
 

Mais procurados (17)

selection structures
selection structuresselection structures
selection structures
 
Computer experiments 1^j2^j3^j4^j8^j9. d24 ^j sakshi gawade cs branch
Computer experiments   1^j2^j3^j4^j8^j9. d24 ^j sakshi gawade cs branchComputer experiments   1^j2^j3^j4^j8^j9. d24 ^j sakshi gawade cs branch
Computer experiments 1^j2^j3^j4^j8^j9. d24 ^j sakshi gawade cs branch
 
escape sequences and substitution markers
escape sequences and substitution markersescape sequences and substitution markers
escape sequences and substitution markers
 
Oop lab assignment 01
Oop lab assignment 01Oop lab assignment 01
Oop lab assignment 01
 
Year 2 dsa c++ exercises on user defined functions
Year 2 dsa  c++ exercises on user defined functionsYear 2 dsa  c++ exercises on user defined functions
Year 2 dsa c++ exercises on user defined functions
 
C programming session 04
C programming session 04C programming session 04
C programming session 04
 
Experiment 9(exceptions)
Experiment 9(exceptions)Experiment 9(exceptions)
Experiment 9(exceptions)
 
Devry cis-170-c-i lab-5-of-7-arrays-and-strings
Devry cis-170-c-i lab-5-of-7-arrays-and-stringsDevry cis-170-c-i lab-5-of-7-arrays-and-strings
Devry cis-170-c-i lab-5-of-7-arrays-and-strings
 
Cp manual final
Cp manual finalCp manual final
Cp manual final
 
Lab no 2 haris
Lab no 2 harisLab no 2 haris
Lab no 2 haris
 
Java programlist (1)
Java programlist (1)Java programlist (1)
Java programlist (1)
 
Session 5-exersice
Session 5-exersiceSession 5-exersice
Session 5-exersice
 
C chap02
C chap02C chap02
C chap02
 
C chap02
C chap02C chap02
C chap02
 
PYTHON PROGRAMS
PYTHON PROGRAMSPYTHON PROGRAMS
PYTHON PROGRAMS
 
Pseudocode
PseudocodePseudocode
Pseudocode
 
2. Write a programto prompt the user to enter 2 integer values. I...
2.             Write a programto prompt the user to enter 2 integer values. I...2.             Write a programto prompt the user to enter 2 integer values. I...
2. Write a programto prompt the user to enter 2 integer values. I...
 

Semelhante a Md university cmis 102 week 4 hands on lab new

Md university cmis 102 week 3 hands
Md university cmis 102 week 3 handsMd university cmis 102 week 3 hands
Md university cmis 102 week 3 handseyavagal
 
Cmis 102 Success Begins / snaptutorial.com
Cmis 102 Success Begins / snaptutorial.comCmis 102 Success Begins / snaptutorial.com
Cmis 102 Success Begins / snaptutorial.comWilliamsTaylorza48
 
Important C program of Balagurusamy Book
Important C program of Balagurusamy BookImportant C program of Balagurusamy Book
Important C program of Balagurusamy BookAbir Hossain
 
CMIS 102 Entire Course NEW
CMIS 102 Entire Course NEWCMIS 102 Entire Course NEW
CMIS 102 Entire Course NEWshyamuopuop
 
OverviewThis hands-on lab allows you to follow and experiment w.docx
OverviewThis hands-on lab allows you to follow and experiment w.docxOverviewThis hands-on lab allows you to follow and experiment w.docx
OverviewThis hands-on lab allows you to follow and experiment w.docxgerardkortney
 
Week 2PRG 218Variables and Input and Output OperationsWrite .docx
Week 2PRG 218Variables and Input and Output OperationsWrite .docxWeek 2PRG 218Variables and Input and Output OperationsWrite .docx
Week 2PRG 218Variables and Input and Output OperationsWrite .docxco4spmeley
 
Comp 122 lab 4 lab report and source code
Comp 122 lab 4 lab report and source codeComp 122 lab 4 lab report and source code
Comp 122 lab 4 lab report and source codepradesigali1
 
Bottom of FormCreate your own FunctionFunctionsFor eac.docx
Bottom of FormCreate your own FunctionFunctionsFor eac.docxBottom of FormCreate your own FunctionFunctionsFor eac.docx
Bottom of FormCreate your own FunctionFunctionsFor eac.docxAASTHA76
 
Week 2PRG 218 Variables and Input and Output OperationsYou w.docx
Week 2PRG 218   Variables and Input and Output OperationsYou w.docxWeek 2PRG 218   Variables and Input and Output OperationsYou w.docx
Week 2PRG 218 Variables and Input and Output OperationsYou w.docxmelbruce90096
 
Week 2PRG 218 Variables and Input and Output OperationsWrite.docx
Week 2PRG 218   Variables and Input and Output OperationsWrite.docxWeek 2PRG 218   Variables and Input and Output OperationsWrite.docx
Week 2PRG 218 Variables and Input and Output OperationsWrite.docxmelbruce90096
 
Project 2Project 2.pdfIntroduction to Programming EECS 1.docx
Project 2Project 2.pdfIntroduction to Programming  EECS 1.docxProject 2Project 2.pdfIntroduction to Programming  EECS 1.docx
Project 2Project 2.pdfIntroduction to Programming EECS 1.docxwkyra78
 
EC6612 VLSI Design Lab Manual
EC6612 VLSI Design Lab ManualEC6612 VLSI Design Lab Manual
EC6612 VLSI Design Lab Manualtamil arasan
 
c++ Question
c++  Questionc++  Question
c++ QuestionHamza4467
 
Chapter 8Exercise1.Design an application that accept.docx
Chapter 8Exercise1.Design an application that accept.docxChapter 8Exercise1.Design an application that accept.docx
Chapter 8Exercise1.Design an application that accept.docxtiffanyd4
 
UoN-Lec_12_Control_Structure.pdf
UoN-Lec_12_Control_Structure.pdfUoN-Lec_12_Control_Structure.pdf
UoN-Lec_12_Control_Structure.pdfmadihamaqbool6
 
HSc Computer Science Practical Slip for Class 12
HSc Computer Science Practical Slip for Class 12HSc Computer Science Practical Slip for Class 12
HSc Computer Science Practical Slip for Class 12Aditi Bhushan
 
Jeremiah Yancy - Objectives for Software design and testing
Jeremiah Yancy - Objectives for Software design and testingJeremiah Yancy - Objectives for Software design and testing
Jeremiah Yancy - Objectives for Software design and testingJeremiah Yancy
 
Mid term sem 2 1415 sol
Mid term sem 2 1415 solMid term sem 2 1415 sol
Mid term sem 2 1415 solIIUM
 

Semelhante a Md university cmis 102 week 4 hands on lab new (20)

Md university cmis 102 week 3 hands
Md university cmis 102 week 3 handsMd university cmis 102 week 3 hands
Md university cmis 102 week 3 hands
 
Cmis 102 Success Begins / snaptutorial.com
Cmis 102 Success Begins / snaptutorial.comCmis 102 Success Begins / snaptutorial.com
Cmis 102 Success Begins / snaptutorial.com
 
Important C program of Balagurusamy Book
Important C program of Balagurusamy BookImportant C program of Balagurusamy Book
Important C program of Balagurusamy Book
 
CMIS 102 Entire Course NEW
CMIS 102 Entire Course NEWCMIS 102 Entire Course NEW
CMIS 102 Entire Course NEW
 
OverviewThis hands-on lab allows you to follow and experiment w.docx
OverviewThis hands-on lab allows you to follow and experiment w.docxOverviewThis hands-on lab allows you to follow and experiment w.docx
OverviewThis hands-on lab allows you to follow and experiment w.docx
 
Week 2PRG 218Variables and Input and Output OperationsWrite .docx
Week 2PRG 218Variables and Input and Output OperationsWrite .docxWeek 2PRG 218Variables and Input and Output OperationsWrite .docx
Week 2PRG 218Variables and Input and Output OperationsWrite .docx
 
Comp 122 lab 4 lab report and source code
Comp 122 lab 4 lab report and source codeComp 122 lab 4 lab report and source code
Comp 122 lab 4 lab report and source code
 
Bottom of FormCreate your own FunctionFunctionsFor eac.docx
Bottom of FormCreate your own FunctionFunctionsFor eac.docxBottom of FormCreate your own FunctionFunctionsFor eac.docx
Bottom of FormCreate your own FunctionFunctionsFor eac.docx
 
I PUC CS Lab_programs
I PUC CS Lab_programsI PUC CS Lab_programs
I PUC CS Lab_programs
 
Week 2PRG 218 Variables and Input and Output OperationsYou w.docx
Week 2PRG 218   Variables and Input and Output OperationsYou w.docxWeek 2PRG 218   Variables and Input and Output OperationsYou w.docx
Week 2PRG 218 Variables and Input and Output OperationsYou w.docx
 
Week 2PRG 218 Variables and Input and Output OperationsWrite.docx
Week 2PRG 218   Variables and Input and Output OperationsWrite.docxWeek 2PRG 218   Variables and Input and Output OperationsWrite.docx
Week 2PRG 218 Variables and Input and Output OperationsWrite.docx
 
3 algorithm-and-flowchart
3 algorithm-and-flowchart3 algorithm-and-flowchart
3 algorithm-and-flowchart
 
Project 2Project 2.pdfIntroduction to Programming EECS 1.docx
Project 2Project 2.pdfIntroduction to Programming  EECS 1.docxProject 2Project 2.pdfIntroduction to Programming  EECS 1.docx
Project 2Project 2.pdfIntroduction to Programming EECS 1.docx
 
EC6612 VLSI Design Lab Manual
EC6612 VLSI Design Lab ManualEC6612 VLSI Design Lab Manual
EC6612 VLSI Design Lab Manual
 
c++ Question
c++  Questionc++  Question
c++ Question
 
Chapter 8Exercise1.Design an application that accept.docx
Chapter 8Exercise1.Design an application that accept.docxChapter 8Exercise1.Design an application that accept.docx
Chapter 8Exercise1.Design an application that accept.docx
 
UoN-Lec_12_Control_Structure.pdf
UoN-Lec_12_Control_Structure.pdfUoN-Lec_12_Control_Structure.pdf
UoN-Lec_12_Control_Structure.pdf
 
HSc Computer Science Practical Slip for Class 12
HSc Computer Science Practical Slip for Class 12HSc Computer Science Practical Slip for Class 12
HSc Computer Science Practical Slip for Class 12
 
Jeremiah Yancy - Objectives for Software design and testing
Jeremiah Yancy - Objectives for Software design and testingJeremiah Yancy - Objectives for Software design and testing
Jeremiah Yancy - Objectives for Software design and testing
 
Mid term sem 2 1415 sol
Mid term sem 2 1415 solMid term sem 2 1415 sol
Mid term sem 2 1415 sol
 

Mais de Last7693

Uop phl 320 final exam guide
Uop phl 320 final exam guideUop phl 320 final exam guide
Uop phl 320 final exam guideLast7693
 
Grand canyon university phi 413 v week 4 spiritual needs assessment and inter...
Grand canyon university phi 413 v week 4 spiritual needs assessment and inter...Grand canyon university phi 413 v week 4 spiritual needs assessment and inter...
Grand canyon university phi 413 v week 4 spiritual needs assessment and inter...Last7693
 
Keller netw 561 final exam 100% correct
Keller netw 561 final exam 100% correctKeller netw 561 final exam 100% correct
Keller netw 561 final exam 100% correctLast7693
 
Uop hrm 498 week 5 strategic hrm plan
Uop hrm 498 week 5 strategic hrm planUop hrm 498 week 5 strategic hrm plan
Uop hrm 498 week 5 strategic hrm planLast7693
 
Uop hrm 324 final exam guide
Uop hrm 324 final exam guideUop hrm 324 final exam guide
Uop hrm 324 final exam guideLast7693
 
Uop fin 370 week 2 question and problem sets
Uop fin 370 week 2 question and problem setsUop fin 370 week 2 question and problem sets
Uop fin 370 week 2 question and problem setsLast7693
 
Uop fin 370 final exam guide
Uop fin 370 final exam guideUop fin 370 final exam guide
Uop fin 370 final exam guideLast7693
 
Ash eng 225 week 5 film critique final paper new
Ash eng 225 week 5 film critique final paper newAsh eng 225 week 5 film critique final paper new
Ash eng 225 week 5 film critique final paper newLast7693
 
Ash ece 315 week 4 assignment lesson plan
Ash ece 315 week 4 assignment lesson planAsh ece 315 week 4 assignment lesson plan
Ash ece 315 week 4 assignment lesson planLast7693
 
Grand canyon university amp 450 v week 2 assignment developing a shared visio...
Grand canyon university amp 450 v week 2 assignment developing a shared visio...Grand canyon university amp 450 v week 2 assignment developing a shared visio...
Grand canyon university amp 450 v week 2 assignment developing a shared visio...Last7693
 
Uop ajs 574 week 1 expenditures and revenue paper new
Uop ajs 574 week 1 expenditures and revenue paper newUop ajs 574 week 1 expenditures and revenue paper new
Uop ajs 574 week 1 expenditures and revenue paper newLast7693
 
Uop cja 305 week 5 worksheet new
Uop cja 305 week 5 worksheet newUop cja 305 week 5 worksheet new
Uop cja 305 week 5 worksheet newLast7693
 
Uop cja 305 week 4 worksheet new
Uop cja 305 week 4 worksheet newUop cja 305 week 4 worksheet new
Uop cja 305 week 4 worksheet newLast7693
 
Uop bus 599 assignment 5 business plan final new
Uop bus 599 assignment 5 business plan final newUop bus 599 assignment 5 business plan final new
Uop bus 599 assignment 5 business plan final newLast7693
 
Uop bus 599 assignment 2 marketing plan new
Uop bus 599 assignment 2 marketing plan newUop bus 599 assignment 2 marketing plan new
Uop bus 599 assignment 2 marketing plan newLast7693
 
Uop bus 599 assignment 3 part 1
Uop bus 599 assignment 3 part 1Uop bus 599 assignment 3 part 1
Uop bus 599 assignment 3 part 1Last7693
 
Strayer bus 499 week 10 assignment 5 capstone new4
Strayer bus 499 week 10 assignment 5 capstone new4Strayer bus 499 week 10 assignment 5 capstone new4
Strayer bus 499 week 10 assignment 5 capstone new4Last7693
 
Strayer bus 499 week 10 assignment 5 capstone new3
Strayer bus 499 week 10 assignment 5 capstone new3Strayer bus 499 week 10 assignment 5 capstone new3
Strayer bus 499 week 10 assignment 5 capstone new3Last7693
 
Strayer bus 499 week 10 assignment 5 capstone new0
Strayer bus 499 week 10 assignment 5 capstone new0Strayer bus 499 week 10 assignment 5 capstone new0
Strayer bus 499 week 10 assignment 5 capstone new0Last7693
 
Strayer bus 499 week 10 assignment 5 capstone new
Strayer bus 499 week 10 assignment 5 capstone newStrayer bus 499 week 10 assignment 5 capstone new
Strayer bus 499 week 10 assignment 5 capstone newLast7693
 

Mais de Last7693 (20)

Uop phl 320 final exam guide
Uop phl 320 final exam guideUop phl 320 final exam guide
Uop phl 320 final exam guide
 
Grand canyon university phi 413 v week 4 spiritual needs assessment and inter...
Grand canyon university phi 413 v week 4 spiritual needs assessment and inter...Grand canyon university phi 413 v week 4 spiritual needs assessment and inter...
Grand canyon university phi 413 v week 4 spiritual needs assessment and inter...
 
Keller netw 561 final exam 100% correct
Keller netw 561 final exam 100% correctKeller netw 561 final exam 100% correct
Keller netw 561 final exam 100% correct
 
Uop hrm 498 week 5 strategic hrm plan
Uop hrm 498 week 5 strategic hrm planUop hrm 498 week 5 strategic hrm plan
Uop hrm 498 week 5 strategic hrm plan
 
Uop hrm 324 final exam guide
Uop hrm 324 final exam guideUop hrm 324 final exam guide
Uop hrm 324 final exam guide
 
Uop fin 370 week 2 question and problem sets
Uop fin 370 week 2 question and problem setsUop fin 370 week 2 question and problem sets
Uop fin 370 week 2 question and problem sets
 
Uop fin 370 final exam guide
Uop fin 370 final exam guideUop fin 370 final exam guide
Uop fin 370 final exam guide
 
Ash eng 225 week 5 film critique final paper new
Ash eng 225 week 5 film critique final paper newAsh eng 225 week 5 film critique final paper new
Ash eng 225 week 5 film critique final paper new
 
Ash ece 315 week 4 assignment lesson plan
Ash ece 315 week 4 assignment lesson planAsh ece 315 week 4 assignment lesson plan
Ash ece 315 week 4 assignment lesson plan
 
Grand canyon university amp 450 v week 2 assignment developing a shared visio...
Grand canyon university amp 450 v week 2 assignment developing a shared visio...Grand canyon university amp 450 v week 2 assignment developing a shared visio...
Grand canyon university amp 450 v week 2 assignment developing a shared visio...
 
Uop ajs 574 week 1 expenditures and revenue paper new
Uop ajs 574 week 1 expenditures and revenue paper newUop ajs 574 week 1 expenditures and revenue paper new
Uop ajs 574 week 1 expenditures and revenue paper new
 
Uop cja 305 week 5 worksheet new
Uop cja 305 week 5 worksheet newUop cja 305 week 5 worksheet new
Uop cja 305 week 5 worksheet new
 
Uop cja 305 week 4 worksheet new
Uop cja 305 week 4 worksheet newUop cja 305 week 4 worksheet new
Uop cja 305 week 4 worksheet new
 
Uop bus 599 assignment 5 business plan final new
Uop bus 599 assignment 5 business plan final newUop bus 599 assignment 5 business plan final new
Uop bus 599 assignment 5 business plan final new
 
Uop bus 599 assignment 2 marketing plan new
Uop bus 599 assignment 2 marketing plan newUop bus 599 assignment 2 marketing plan new
Uop bus 599 assignment 2 marketing plan new
 
Uop bus 599 assignment 3 part 1
Uop bus 599 assignment 3 part 1Uop bus 599 assignment 3 part 1
Uop bus 599 assignment 3 part 1
 
Strayer bus 499 week 10 assignment 5 capstone new4
Strayer bus 499 week 10 assignment 5 capstone new4Strayer bus 499 week 10 assignment 5 capstone new4
Strayer bus 499 week 10 assignment 5 capstone new4
 
Strayer bus 499 week 10 assignment 5 capstone new3
Strayer bus 499 week 10 assignment 5 capstone new3Strayer bus 499 week 10 assignment 5 capstone new3
Strayer bus 499 week 10 assignment 5 capstone new3
 
Strayer bus 499 week 10 assignment 5 capstone new0
Strayer bus 499 week 10 assignment 5 capstone new0Strayer bus 499 week 10 assignment 5 capstone new0
Strayer bus 499 week 10 assignment 5 capstone new0
 
Strayer bus 499 week 10 assignment 5 capstone new
Strayer bus 499 week 10 assignment 5 capstone newStrayer bus 499 week 10 assignment 5 capstone new
Strayer bus 499 week 10 assignment 5 capstone new
 

Último

Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application ) Sakshi Ghasle
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpinRaunakKeshri1
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 

Último (20)

Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application )
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSDStaff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpin
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 

Md university cmis 102 week 4 hands on lab new

  • 1. MD University CMIS 102 Week 4 Hands on Lab NEW Check this A+ tutorial guideline at http://www.assignmentcloud.com/cmis-102- md-university-/cmis-102-week-4-hands-on- lab-new For more classes visit http://www.assignmentcloud.com/ Week 4 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 (using pseudocode), and implementation with C code. The example provided uses sequential and selection statements.
  • 2. Program Description This program will calculate the sum of 5 integers. The program will ask the user to 5 integers. If the sumof the numbers is greater than 100, a message is printed stating the sum is over 100. The design step will include both pseudocode. Analysis I will use sequential, and selection programming statements. I will define six integer numbers: value1, value2, value3, value4, value5 and sum. The value1, value2,value3, value4 and value5 variables will store the integers input by the user. The sum will store the sum of the 5 values. The sum will be calculated by this formula: sum = value1 + value2 + value3 + value4 + value5 For example, if the first values entered were value 1=1, value 2=1, value 3=2,value 4=2 and value 5=3 respectively: sum = 1 + 1 + 2 + 2 + 3 = 9
  • 3. The additional selection statement will be of this form: If sum > 100 then print "Sum is over 100" End If Test Plan To verify this program is working properly the input values could be used for testing: Test Case 1 2 Input value1=1 value2=1 value3=1 value4=0 Value5=2 value=100 value=100 value=100 value=100 value=200 Expected Output Sum = 5 Sum = 600 Sum is over 100. 1 3 value= -100 value= -100 value= -200 value = 0 value= 200 Sum = -200 Pseudocode // This program will calculate the sum of 5
  • 4. integers. // Declare variables Declare value1, value2, value3, value4, value5, sum as Integer //Initialize Sum to 0 Set sum = 0 // Enter Print Input Print Input Print Input Print Input Print Input values “Enter value1 “Enter value2 “Enter value3 “Enter value4 “Enter value5 an Integer for value1”
  • 5. an Integer for value2” an Integer for value3” an Integer for value4” an Integer for value5” // Calculate sum sum = value1 + value2 + value3 + value4 + value5 // Print results and messages Print “Sum is “ + sum If (sum > 100) Printf “Sum is over 100” End if C Code The following is the C Code that will compile in execute in the online compilers. // C code // This program will calculate the sum of 5 integers. // Developer: Faculty CMIS102 // Date: Jan 31, XXXX #include <stdio.h> int main () 2 { /* variable definition: */ int value1,value2,value3,value4,value5,sum; /* Initialize sum */ sum = 0; printf("Enter an Integer scanf("%d", &value1); printf("Enter an Integer scanf("%d", &value2);
  • 6. printf("Enter an Integer scanf("%d", &value3); printf("Enter an Integer scanf("%d", &value4); printf("Enter an Integer scanf("%d", &value5); for value1n"); for value2n"); for value3n"); for value4n"); for value5n"); sum = value1 + value2 + value3 + value4 + value5; printf("Sum is %dn " , sum ); if (sum >100) printf("Sum is over 100n"); return 0; } Setting up the code and the input parameters in ideone.com: Note the input integer values are 100, 100, 100, 200 and 100, for this test case. You can change these values to any valid integer values to match your test cases. 3 Results from running within ideone 4 Learning Exercises for you to complete
  • 7. 1. Demonstrate you successfully followed the steps in this lab by preparing screen captures of you running the lab as specified in the Instructions above. 2. Change the C code to sum 10 integers as opposed to 5? (Hint: Please don’t use arrays or Loops for this. We will be using those features in another week.) Support your experimentation with a screen capture of executing the new code 3. Using the code you create in step 1, modify the code to print an additional statement if the sum of the value is negative (Hint: Consider modifying the existing selection statement) Support your experimentation with a screen capture of executing the new code. 4. Prepare a new test table with at least 3 distinct test cases listing input and expected output for the code you created after step 2. 5. Create your own C code implementation of one of the following mathematical formulas: a. y = mx + b; (slope of a line) Assume the user will be prompted to input m, x and b and the program will calculate y. If the value of y is greater than 10, inform the user the value is greater than 10. b. a = PI * r*r; (area of circle). Assume the user will be prompted to input the radius r. You can define
  • 8. PI as 3.1416. . If the value of a is greater than 10, inform the user the value is greater than 10. c. v = 4/3 PI r*r*r; (volume of sphere) Assume the user will be prompted to input the radius r. You can define PI at 3.1416. If the value of v is greater than 10, inform the user the value is greater than 10. Be sure you provide not only the C code but a test table with at least 3 distinct test cases listing input and expected output your mathematical formula. Submission Submit a neatly organized word (or PDF) document that demonstrates you successfully executed this labon your machine using an online compiler. You should provide a screen capture of the resulting output.Submit all C code you created in files. Also, provide the answers and any associated screen captures of your successful completion of exercises 1, 2, 3 and 4. Submit your document no later than the due date listed in the syllabus or calendar. 5 Grading guidelines
  • 9. Submission Demonstrates the successful execution of this Lab within an online compiler. Provides supporting screen captures. Modifies the C code to sum 10 integers as opposed to 5. Supports your experimentation with screen captures of executing the code. Using the code created in step 1, modifies the code to print an additional statement if the sum of the value is negative Supports your experimentation with a screen capture of executing the new code. Provides a new test table with at least 3 distinct test cases listing input and expected output for the code you created after step 2. Creates your own unique C code implementation of one of the provided mathematical formulas. Provides a new test table with at least 3 distinct test cases listing input and expected output your mathematical formula. Supports your experimentation with a screen capture of executing the new code.
  • 10. Document is well-organized, and contains minimal spelling and grammatical errors. Total Points 2 2 2 1 2 1 10 6