SlideShare una empresa de Scribd logo
1 de 31
Descargar para leer sin conexión
CMIS 102 Homework 1 Solution (100% Correct)
For more classes visit
www.snaptutorial.com
Introduction to Problem Solving and Algorithm Design
Using the above Code of Ethics, Pick at least 2 of the 8 principles and
describe what these principles mean to you. In your write-up, summarize
the principles you selected in your own words and provide at least one
example of an activity or action you could take that would support each
principle and one example of an activity or action that you believe
would violate each principle. Be sure your document is well-written with
minimal grammatical and spelling issues.
**********************************************************
CMIS 102 Homework 2 Test Case Creation
Using the following pseudocode (100% Correct)
For more classes visit
www.snaptutorial.com
Homework 2 – Test Case Creation Using the following pseudocode,
provide 3 unique test cases that would help validate your
algorithm. Be sure to place the test cases in a table showing the input
https://www.coursehero.com/tutors-problems/Computer-
Science/10754291-I-need-help-with-c-coding-asap-how-much-will-it-
be/zvalues, and expected output
for each test case.
Write "Enter the price in dollars:"
Input Price
Write "Enter state sales tax(e.g. .06) :"
Input SalesTax
Set Price = Price + (Price * SalesTax)
Write "Price with Tax is" + Price Submit your word or PDF
file to your assignments folder no later than the due date. Grading
guidelines
Submission
A minimum of 3 test cases were provided.
Input provided and explained for each test case.
Expected output provided and explained for each test case.
Test cases represent a wide variety of possible input values (e.g. large
numbers,
small numbers (0), negative, or unexpected non-number entries).
Total Points
2
1
1
1
5
**********************************************************
CMIS 102 Homework 3 (100% Correct)
For more classes visit
www.snaptutorial.com
Create your own unique While-End or (For End) repetition C code. You
decide the theme. Be sure to provide an overview of what your repetition
structure is doing. Please keep the design simple for this exercise. Just a
few lines of code is all that is needed for this response. This should be
code you wrote for an application that is interesting to you. In other
words, make it your own and have fun with it.
Provide the C code and a screen capture showing the results of testing
your code in an online compiler. Be sure to test your code with several
test cases and show your test case table
**********************************************************
CMIS 102 Homework 4 Create your own
Function
For more classes visit
www.snaptutorial.com
Create your own function in C that accepts one input parameter and
returns a float number. You decide the theme.
You should provide both your C code and an example call to the C code
function. Be sure to provide an overview of what your function is doing.
Provide a screen capture showing the results of testing your code in an
online compiler.
Be sure to test your code with several test cases and show your test case
table.
Submit your word or PDF file to your assignments folder no later than
the due date.
**********************************************************
CMIS 102 Week 1 Hands-On Lab
For more classes visit
www.snaptutorial.com
CMIS 102 Week 1 Hands-On Lab
This hands-on lab demonstrate a simple sequential print statements using
an online C compiler such as ideone.com. You should follow the
instructions to complete the lab as well as perform the learning exercises
at the end of this lab.
Instructions
1. Open up any online C compiler (e.g ideone.com).
2. Be sure the C Language is selected.
3. Enter the code below into the editor. (Note: LEO doesn’t let you just
copy and paste from this document so you can either download the
document and then copy and paste or just go to the Code for HelloWorld
link for this week and copy and paste from there.)
4. Click the submit, or run button.
5. Try the additional learning exercises on the next page. Here is what
Hello, World! Looks like using ideone.com after it has successfully run
Hello, World C code
1
2
3
4
5
6 #include <stdio.h>
int main(void) {
printf("Hello, World!");
return 0;
}
Learning Exercises for you to complete
1. Remove the semi-colon (;) at the end of this statement:
1 printf("Hello, World!");
2. Describe what happens. Why is the semi-colon needed?
3. What happens if you add another printf statement such as:
1 printf("Goodbye"); after the printf("Hello, World!"); line?
4. Describe the new output. Be sure to support your description with
screen captures of executing the new code.
5. Experiment by adding additional printf statements to your code such
as:
1
2 printf("Goodbye n");
printf("Hello, again! n");
6. What does the “n” do to the output?
**********************************************************
CMIS 102 Week 2 Hands-On Lab
For more classes visit
www.snaptutorial.com
CMIS 102 Week 2 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.
Program Description
This program will sum two integer numbers to yield a third integer
number. Once the calculations are made the results of all the numbers
will be printed to the output screen.
Analysis
We will use sequential programming statements.
We will define 3 integer numbers: a, b, c.
c will store the sum of a and b.
Test Plan
To understand this program the following input numbers could be used
for testing:
a = 10
b = 20
c = a + b = 10 + 20 = 30
In table format the following results are expected:
Learning Exercises for you to complete
1. Change the C code to calculate the product of two integers as opposed
to the sum of two integers. Support your experimentation with a screen
capture of executing the new code.
2. Prepare a new test table with at least 3 distinct test cases listing input
and expected output for the product of two integers.
3. Change the C code to calculate the quotient (e.g. a/b) of two floats
(e.g. 2.3/1.5).Hint: Use float variable types as opposed to integers. What
happens if the denominator is 0.0? Support your experimentation with
screen captures 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 quotient of two floats.
Submission
• Submit a neatly organized word (or PDF) document that demonstrates
you successfully executed this lab on your machine using an online
compiler. You should provide a screen capture of the resulting output.
• Also, provide the answers, associated screen captures, C Code and
descriptions of your successful completion of learning exercises 1, 2, 3
and 4.
• The answers to the learning exercises, screen captures, C code and
descriptions can be included in the
same neatly organized document you prepared as you ran this lab. Note
the code can be embedded in the word document. However; be sure all
code compiles and runs perfectly before submitting the document.
• Submit your document no later than the due date listed in the syllabus
or calendar.
**********************************************************
CMIS 102 Week 3 Hands-On Lab
For more classes visit
www.snaptutorial.com
CMIS 102 Week 3 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, pseudocode visualization, and implementation
with C code. The example provided uses mathematical operators and
variable types. Program
Description
This program will calculate the area of a right triangle. The program will
ask the user to enter the base and height and then use these values to
calculate and then print the area of the triangle. The design step will
include pseudocode.
Analysis
I will use sequential programming statements. I will define two float
numbers for the base and height: base, height. Float numbers were
selected as opposed to integers to make sure triangles of all dimensions
are possible and not just whole numbers.
Float number will store the area: area
The area will be calculated by this formula:
Area = ½ * (base * height)
For example if the base was 4.2 and the height was 5.3 the area would be
calculated as:
Area = ½ * (4.2 * 5.3) = ½ * (22.26) = 11.13
Test Plan
To verify this program is working properly the following base and
height values could be used for testing:
Learning Exercises to be complete (Setting up the code and the input
parameters in ideone.com:)
1. Change the C code to calculate the perimeter of a triangle. Support
your experimentation with a screen capture of executing the new code
2. Prepare a new test table with at least 3 distinct test cases listing input
and expected output for the perimeter of a triangle.
3. What is this line of code doing?
1 scanf("%f", &height);
4. How would you change this line if you wanted to input an Integer as
opposed to a float?
5. What are the values of f and g after executing the following C?
**********************************************************
CMIS 102 Week 4 Hands-On Lab
For more classes visit
www.snaptutorial.com
CMIS 102 Hands-On Lab
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 sum
of 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 &gt; 100 then
print &quot;Sum is over 100&quot;
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 &gt; 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 &lt;stdio.h&gt;
int main () 2 {
/* variable definition: */
int value1,value2,value3,value4,value5,sum; /* Initialize sum */
sum = 0;
printf(&quot;Enter an Integer
scanf(&quot;%d&quot;, &amp;value1);
printf(&quot;Enter an Integer
scanf(&quot;%d&quot;, &amp;value2);
printf(&quot;Enter an Integer
scanf(&quot;%d&quot;, &amp;value3);
printf(&quot;Enter an Integer
scanf(&quot;%d&quot;, &amp;value4);
printf(&quot;Enter an Integer
scanf(&quot;%d&quot;, &amp;value5); for value1n&quot;);
for value2n&quot;);
for value3n&quot;);
for value4n&quot;);
for value5n&quot;); sum = value1 + value2 + value3 + value4 + value5;
printf(&quot;Sum is %dn &quot; , sum );
if (sum &gt;100)
printf(&quot;Sum is over 100n&quot;);
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 lab
on 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
**********************************************************
CMIS 102 Week 5 Hands-On Lab
For more classes visit
www.snaptutorial.com
CMIS 102 Week 5 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 (using pseudocode), and implementation with
C code. The example provided uses sequential, selection and repetition
statements.
Program Description
This program will calculate the average of 10 positive integers. The
program will ask the user to 10 integers. If any of the values entered is
negative, a message will be displayed asking the user to enter a value
greater than 0. The program will use a loop to input the data.
Analysis
I will use sequential, selection and repetition programming statements. I
will define two integer numbers: count, value and sum. count will store
how many times values are entered. value will store the input. Sum will
store the sum of all 10 integers. I will define one double number: avg.
avg will store the average of the ten positive integers input.
The sum will be calculated by this formula:
Learning Exercises for you to complete
1. Change the code to average 20 integers as opposed to 10. Support
your experimentation with screen captures of executing the new code.
2. 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.
3. What happens if you entered a value other than an integer? (For
example a float or even a string). Support your experimentation with
screen captures of executing the code.
4. Modify the code to allow the user to enter an unspecified number of
positive integers and calculate the average. In other words, the user
could enter number of positive integers. (Hint: You can prompt the user
for how many they want to enter. Or; you could use a sentinel value to
trigger when the user has completed entering values). You may need to
conduct some research on your own to solve this problem. Prepare a new
test table with at least 3 distinct test cases listing input and expected
output for the code you created. Support your experimentation with
screen captures of executing the new code
**********************************************************
CMIS 102 Week 6 Hands-On Lab
For more classes visit
www.snaptutorial.com
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 uses sequential, repetition statements and nested repetition
statements.
Program Description
This 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.
Analysis
I will use sequential and repetition programming statements.
I will define one String to store the student name: StudentName.
I will define three Float numbers: Examvalue, Sum, Avg to store exam
values the sum of the exams and the average of the exams.
The sum will be calculated by this formula:
Sum = Sum + Examvalue
For 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
sum = 80.0 + 90.0 = 170.0
sum = 170.0 + 100.0 = 270.0
Avg is then calculated as:
Avg = sum/3.0
For example 270.0/3.0 = 90.0
A nested repetition loop can be used to loop through each of the 5
students and each of the 3 exams:
For (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
To verify this program is working properly the input values could be
used for testing:
Learning Exercises for you to complete
1. 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.
2. 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.
3. What is the line of code doing?
charStudentName[100];
(Hint: We haven’t covered arrays, but a String can be thought of as an
array of characters) ?
4. What would happen if you moved the Set Sum = 0.0 from inside the
for loop to right after the declaration. For example:
// Declare variables
Declare StudentName as String Declare ExamValue, Sum, Avg as Float
// Initialize Sum Set Sum = 0.0;
Support your experimentation with screen captures of executing the new
code.
**********************************************************
CMIS 102 Week 7 Hands-On Lab
For more classes visit
www.snaptutorial.com
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 uses sequential, repetition, selection statements and
two user-defined function.
Program Description
This 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
calculate the square of the cube of the number. Based on the inputs of
the user, the program will output
the 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’s
original choice. The program will continue to prompt the user for
Integers and their calculation choice until the user enters a negative
integer. The square and cube calculations should be calculated using a
function.
Analysis
I will use sequential, selection, and repetition programming statements
and functions for the cube and
square 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.
The 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
For example: if 10 was entered as the IntValue. Results = 10*10 = 100
The Cube function will take one Integer as input and return one Integer
as the output. The calculation
within the Cube function is: Results = IntValue * IntValue*IntValue
For example: if 10 was entered as the IntValue. Results = 10*10*10 =
1000
A repetition loop can be used to loop through iterations until a negative
is entered:
Learning Exercises for you to complete
1. Using the Square and Cube functions as models, Create an application
that includes a function named “Shrink” 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.
2. 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.
3. 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.
4. 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.
**********************************************************
CMIS 102 Week 8 Hands-On Lab
For more classes visit
www.snaptutorial.com
CMIS 102 Week 8 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, Design(program design, pseudocode), Test Plan, and
implementation with C code. The example provided uses sequential,
repetition, selection statements, functions, strings, and arrays.
Program Description:
This program will input and store meteorological data into an array. The
program will prompt the user to enter the average monthly rainfall for a
specific region and then use a loop to cycle through the array and print
out each value. The program should store up 5 years of meteorological
data.
Analysis:
I will use sequential, selection, and repetition programming statements
and an array to store data.
I will define a 2-D array of Float number: Raindata[][] to store the Float
values input by the user. To store up to 5 years of monthly data, the
array size should be at least 5*12 = 60 elements.
A float number (rain) will also be needed to input the individual rain
data.
An integer variable (Count) is needed to keep count of how many rain
data elements were entered. This will keep track to make sure we don’t
go over 60 and we print only valid rain elements. In a 2D array this will
be RainData[5][12]. We can use #defines to set the number of years and
months to eliminate hard coding values.
A float number (rain) will also be needed to input the individual rain
data. A nested for loop can be used to iterate through the array to enter
Raindata. A nested for loop can also be used to print the data in the
array. A array of strings can be used to store year and month names.
This will allow a tabular display with labels for the printout. Functions
will be used to separate functionality into smaller work units. Functions
for displaying the data and inputting the data will be used.
A selection statement will be used to determine if data should be
entered.
Learning Exercises for you to try:
1. Modify the program to add a function to sum the rainfall for each year
(Hint: you need to sum for each year. You can do this using a looping
structure) Support your experimentation with screen captures of
executing the new code
2. Enhance the program to allow the user to enter another meteorological
element such as windspeed (e.g. 2.4 mph). Note, the user should be able
to enter both rainfall and windspeed in your new implementation.
Support your experimentation with screen captures of executing the new
code.
3. Prepare a new test table with at least 2 distinct test cases listing input
and expected output for the code you created after step 2
4. What happens if you change the NUMMONTHS and NUMYEARS
de finitions to other values? Be sure to useboth lower and higher values.
Describe and implement fixes for any issues if errors results. Support
your experimentation with screen captures of executing the new code.
**********************************************************

Más contenido relacionado

La actualidad más candente

CIS 170 Life of the Mind/newtonhelp.com   
CIS 170 Life of the Mind/newtonhelp.com   CIS 170 Life of the Mind/newtonhelp.com   
CIS 170 Life of the Mind/newtonhelp.com   llflowe
 
Cis 170 Extraordinary Success/newtonhelp.com
Cis 170 Extraordinary Success/newtonhelp.com  Cis 170 Extraordinary Success/newtonhelp.com
Cis 170 Extraordinary Success/newtonhelp.com amaranthbeg143
 
C programming session 10
C programming session 10C programming session 10
C programming session 10Vivek Singh
 
Cis 355 i lab 4 of 6
Cis 355 i lab 4 of 6Cis 355 i lab 4 of 6
Cis 355 i lab 4 of 6helpido9
 
Quiz1 tonghop
 Quiz1 tonghop Quiz1 tonghop
Quiz1 tonghopDaewoo Han
 
Error handling and debugging in vb
Error handling and debugging in vbError handling and debugging in vb
Error handling and debugging in vbSalim M
 
Question đúng cnu
Question đúng cnuQuestion đúng cnu
Question đúng cnuPhamHoc
 
C chap02
C chap02C chap02
C chap02Kamran
 
Pseudocode algorithim flowchart
Pseudocode algorithim flowchartPseudocode algorithim flowchart
Pseudocode algorithim flowchartfika sweety
 
Unit 1 introduction to visual basic programming
Unit 1 introduction to visual basic programmingUnit 1 introduction to visual basic programming
Unit 1 introduction to visual basic programmingAbha Damani
 
Diving into VS 2015 Day2
Diving into VS 2015 Day2Diving into VS 2015 Day2
Diving into VS 2015 Day2Akhil Mittal
 

La actualidad más candente (15)

CIS 170 Life of the Mind/newtonhelp.com   
CIS 170 Life of the Mind/newtonhelp.com   CIS 170 Life of the Mind/newtonhelp.com   
CIS 170 Life of the Mind/newtonhelp.com   
 
Cis 170 Extraordinary Success/newtonhelp.com
Cis 170 Extraordinary Success/newtonhelp.com  Cis 170 Extraordinary Success/newtonhelp.com
Cis 170 Extraordinary Success/newtonhelp.com
 
Programing Fundamental
Programing FundamentalPrograming Fundamental
Programing Fundamental
 
C programming session 10
C programming session 10C programming session 10
C programming session 10
 
Cis 355 i lab 4 of 6
Cis 355 i lab 4 of 6Cis 355 i lab 4 of 6
Cis 355 i lab 4 of 6
 
Quiz1 tonghop
 Quiz1 tonghop Quiz1 tonghop
Quiz1 tonghop
 
Error handling and debugging in vb
Error handling and debugging in vbError handling and debugging in vb
Error handling and debugging in vb
 
Problem solving and design
Problem solving and designProblem solving and design
Problem solving and design
 
Question đúng cnu
Question đúng cnuQuestion đúng cnu
Question đúng cnu
 
C chap02
C chap02C chap02
C chap02
 
C chap02
C chap02C chap02
C chap02
 
Pseudocode algorithim flowchart
Pseudocode algorithim flowchartPseudocode algorithim flowchart
Pseudocode algorithim flowchart
 
Unit 1 introduction to visual basic programming
Unit 1 introduction to visual basic programmingUnit 1 introduction to visual basic programming
Unit 1 introduction to visual basic programming
 
Diving into VS 2015 Day2
Diving into VS 2015 Day2Diving into VS 2015 Day2
Diving into VS 2015 Day2
 
Debugging in .Net
Debugging in .NetDebugging in .Net
Debugging in .Net
 

Similar a Cmis 102 Success Begins / snaptutorial.com

Educational courses/tutorialoutlet.com
Educational courses/tutorialoutlet.comEducational courses/tutorialoutlet.com
Educational courses/tutorialoutlet.comCrookstonz
 
Md university cmis 102 week 4 hands on lab new
Md university cmis 102 week 4 hands on lab newMd university cmis 102 week 4 hands on lab new
Md university cmis 102 week 4 hands on lab newLast7693
 
Md university cmis 102 week 4 hands on lab new
Md university cmis 102 week 4 hands on lab newMd university cmis 102 week 4 hands on lab new
Md university cmis 102 week 4 hands on lab newscottbrownnn
 
Md university cmis 102 week 4 hands on lab new
Md university cmis 102 week 4 hands on lab newMd university cmis 102 week 4 hands on lab new
Md university cmis 102 week 4 hands on lab neweyavagal
 
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
 
cscript_controller.pdf
cscript_controller.pdfcscript_controller.pdf
cscript_controller.pdfVcTrn1
 
CIS 170 Focus Dreams/newtonhelp.com
CIS 170 Focus Dreams/newtonhelp.comCIS 170 Focus Dreams/newtonhelp.com
CIS 170 Focus Dreams/newtonhelp.combellflower82
 
Md university cmis 102 week 5 hands
Md university cmis 102 week 5 handsMd university cmis 102 week 5 hands
Md university cmis 102 week 5 handseyavagal
 
CIS 170 Imagine Your Future/newtonhelp.com   
CIS 170 Imagine Your Future/newtonhelp.com   CIS 170 Imagine Your Future/newtonhelp.com   
CIS 170 Imagine Your Future/newtonhelp.com   bellflower42
 
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
 
Case Study Analysis 2The Cholesterol.xls records cholesterol lev.docx
Case Study Analysis 2The Cholesterol.xls records cholesterol lev.docxCase Study Analysis 2The Cholesterol.xls records cholesterol lev.docx
Case Study Analysis 2The Cholesterol.xls records cholesterol lev.docxwendolynhalbert
 
CSCI1250 Project 3 Fall 2015 CSCI1250 INTRODUCTIO.docx
CSCI1250    Project 3  Fall 2015  CSCI1250 INTRODUCTIO.docxCSCI1250    Project 3  Fall 2015  CSCI1250 INTRODUCTIO.docx
CSCI1250 Project 3 Fall 2015 CSCI1250 INTRODUCTIO.docxfaithxdunce63732
 
Devry cis-170-c-i lab-1-of-7-getting-started
Devry cis-170-c-i lab-1-of-7-getting-startedDevry cis-170-c-i lab-1-of-7-getting-started
Devry cis-170-c-i lab-1-of-7-getting-startednoahjamessss
 
Devry cis-170-c-i lab-1-of-7-getting-started
Devry cis-170-c-i lab-1-of-7-getting-startedDevry cis-170-c-i lab-1-of-7-getting-started
Devry cis-170-c-i lab-1-of-7-getting-startedgovendaagoovenda
 
CIS 170 Effective Communication - tutorialrank.com
CIS 170 Effective Communication - tutorialrank.comCIS 170 Effective Communication - tutorialrank.com
CIS 170 Effective Communication - tutorialrank.comBartholomew19
 
Question 1Using Powerpoint, Word, Visio or any other graphical e.docx
Question 1Using Powerpoint, Word, Visio or any other graphical e.docxQuestion 1Using Powerpoint, Word, Visio or any other graphical e.docx
Question 1Using Powerpoint, Word, Visio or any other graphical e.docxIRESH3
 
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
 
Mid term sem 2 1415 sol
Mid term sem 2 1415 solMid term sem 2 1415 sol
Mid term sem 2 1415 solIIUM
 
Final Exam Solutions Fall02
Final Exam Solutions Fall02Final Exam Solutions Fall02
Final Exam Solutions Fall02Radu_Negulescu
 
Cis 170 ilab 1 of 7
Cis 170 ilab 1 of 7Cis 170 ilab 1 of 7
Cis 170 ilab 1 of 7comp274
 

Similar a Cmis 102 Success Begins / snaptutorial.com (20)

Educational courses/tutorialoutlet.com
Educational courses/tutorialoutlet.comEducational courses/tutorialoutlet.com
Educational courses/tutorialoutlet.com
 
Md university cmis 102 week 4 hands on lab new
Md university cmis 102 week 4 hands on lab newMd university cmis 102 week 4 hands on lab new
Md university cmis 102 week 4 hands on lab new
 
Md university cmis 102 week 4 hands on lab new
Md university cmis 102 week 4 hands on lab newMd university cmis 102 week 4 hands on lab new
Md university cmis 102 week 4 hands on lab new
 
Md university cmis 102 week 4 hands on lab new
Md university cmis 102 week 4 hands on lab newMd university cmis 102 week 4 hands on lab new
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 hands
 
cscript_controller.pdf
cscript_controller.pdfcscript_controller.pdf
cscript_controller.pdf
 
CIS 170 Focus Dreams/newtonhelp.com
CIS 170 Focus Dreams/newtonhelp.comCIS 170 Focus Dreams/newtonhelp.com
CIS 170 Focus Dreams/newtonhelp.com
 
Md university cmis 102 week 5 hands
Md university cmis 102 week 5 handsMd university cmis 102 week 5 hands
Md university cmis 102 week 5 hands
 
CIS 170 Imagine Your Future/newtonhelp.com   
CIS 170 Imagine Your Future/newtonhelp.com   CIS 170 Imagine Your Future/newtonhelp.com   
CIS 170 Imagine Your Future/newtonhelp.com   
 
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
 
Case Study Analysis 2The Cholesterol.xls records cholesterol lev.docx
Case Study Analysis 2The Cholesterol.xls records cholesterol lev.docxCase Study Analysis 2The Cholesterol.xls records cholesterol lev.docx
Case Study Analysis 2The Cholesterol.xls records cholesterol lev.docx
 
CSCI1250 Project 3 Fall 2015 CSCI1250 INTRODUCTIO.docx
CSCI1250    Project 3  Fall 2015  CSCI1250 INTRODUCTIO.docxCSCI1250    Project 3  Fall 2015  CSCI1250 INTRODUCTIO.docx
CSCI1250 Project 3 Fall 2015 CSCI1250 INTRODUCTIO.docx
 
Devry cis-170-c-i lab-1-of-7-getting-started
Devry cis-170-c-i lab-1-of-7-getting-startedDevry cis-170-c-i lab-1-of-7-getting-started
Devry cis-170-c-i lab-1-of-7-getting-started
 
Devry cis-170-c-i lab-1-of-7-getting-started
Devry cis-170-c-i lab-1-of-7-getting-startedDevry cis-170-c-i lab-1-of-7-getting-started
Devry cis-170-c-i lab-1-of-7-getting-started
 
CIS 170 Effective Communication - tutorialrank.com
CIS 170 Effective Communication - tutorialrank.comCIS 170 Effective Communication - tutorialrank.com
CIS 170 Effective Communication - tutorialrank.com
 
Question 1Using Powerpoint, Word, Visio or any other graphical e.docx
Question 1Using Powerpoint, Word, Visio or any other graphical e.docxQuestion 1Using Powerpoint, Word, Visio or any other graphical e.docx
Question 1Using Powerpoint, Word, Visio or any other graphical e.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
 
Mid term sem 2 1415 sol
Mid term sem 2 1415 solMid term sem 2 1415 sol
Mid term sem 2 1415 sol
 
Final Exam Solutions Fall02
Final Exam Solutions Fall02Final Exam Solutions Fall02
Final Exam Solutions Fall02
 
Cis 170 ilab 1 of 7
Cis 170 ilab 1 of 7Cis 170 ilab 1 of 7
Cis 170 ilab 1 of 7
 

Último

Q-Factor General Quiz-7th April 2024, Quiz Club NITW
Q-Factor General Quiz-7th April 2024, Quiz Club NITWQ-Factor General Quiz-7th April 2024, Quiz Club NITW
Q-Factor General Quiz-7th April 2024, Quiz Club NITWQuiz Club NITW
 
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...Team Lead Succeed – Helping you and your team achieve high-performance teamwo...
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...Association for Project Management
 
PART 1 - CHAPTER 1 - CELL THE FUNDAMENTAL UNIT OF LIFE
PART 1 - CHAPTER 1 - CELL THE FUNDAMENTAL UNIT OF LIFEPART 1 - CHAPTER 1 - CELL THE FUNDAMENTAL UNIT OF LIFE
PART 1 - CHAPTER 1 - CELL THE FUNDAMENTAL UNIT OF LIFEMISSRITIMABIOLOGYEXP
 
Comparative Literature in India by Amiya dev.pptx
Comparative Literature in India by Amiya dev.pptxComparative Literature in India by Amiya dev.pptx
Comparative Literature in India by Amiya dev.pptxAvaniJani1
 
4.11.24 Poverty and Inequality in America.pptx
4.11.24 Poverty and Inequality in America.pptx4.11.24 Poverty and Inequality in America.pptx
4.11.24 Poverty and Inequality in America.pptxmary850239
 
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptx
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptxDecoding the Tweet _ Practical Criticism in the Age of Hashtag.pptx
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptxDhatriParmar
 
How to Uninstall a Module in Odoo 17 Using Command Line
How to Uninstall a Module in Odoo 17 Using Command LineHow to Uninstall a Module in Odoo 17 Using Command Line
How to Uninstall a Module in Odoo 17 Using Command LineCeline George
 
Scientific Writing :Research Discourse
Scientific  Writing :Research  DiscourseScientific  Writing :Research  Discourse
Scientific Writing :Research DiscourseAnita GoswamiGiri
 
Indexing Structures in Database Management system.pdf
Indexing Structures in Database Management system.pdfIndexing Structures in Database Management system.pdf
Indexing Structures in Database Management system.pdfChristalin Nelson
 
6 ways Samsung’s Interactive Display powered by Android changes the classroom
6 ways Samsung’s Interactive Display powered by Android changes the classroom6 ways Samsung’s Interactive Display powered by Android changes the classroom
6 ways Samsung’s Interactive Display powered by Android changes the classroomSamsung Business USA
 
DiskStorage_BasicFileStructuresandHashing.pdf
DiskStorage_BasicFileStructuresandHashing.pdfDiskStorage_BasicFileStructuresandHashing.pdf
DiskStorage_BasicFileStructuresandHashing.pdfChristalin Nelson
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 11 THEO ĐƠN VỊ BÀI HỌC - CẢ NĂM - CÓ FILE NGHE (GLOB...
BÀI TẬP BỔ TRỢ TIẾNG ANH 11 THEO ĐƠN VỊ BÀI HỌC - CẢ NĂM - CÓ FILE NGHE (GLOB...BÀI TẬP BỔ TRỢ TIẾNG ANH 11 THEO ĐƠN VỊ BÀI HỌC - CẢ NĂM - CÓ FILE NGHE (GLOB...
BÀI TẬP BỔ TRỢ TIẾNG ANH 11 THEO ĐƠN VỊ BÀI HỌC - CẢ NĂM - CÓ FILE NGHE (GLOB...Nguyen Thanh Tu Collection
 
Shark introduction Morphology and its behaviour characteristics
Shark introduction Morphology and its behaviour characteristicsShark introduction Morphology and its behaviour characteristics
Shark introduction Morphology and its behaviour characteristicsArubSultan
 
Satirical Depths - A Study of Gabriel Okara's Poem - 'You Laughed and Laughed...
Satirical Depths - A Study of Gabriel Okara's Poem - 'You Laughed and Laughed...Satirical Depths - A Study of Gabriel Okara's Poem - 'You Laughed and Laughed...
Satirical Depths - A Study of Gabriel Okara's Poem - 'You Laughed and Laughed...HetalPathak10
 
Man or Manufactured_ Redefining Humanity Through Biopunk Narratives.pptx
Man or Manufactured_ Redefining Humanity Through Biopunk Narratives.pptxMan or Manufactured_ Redefining Humanity Through Biopunk Narratives.pptx
Man or Manufactured_ Redefining Humanity Through Biopunk Narratives.pptxDhatriParmar
 
Sulphonamides, mechanisms and their uses
Sulphonamides, mechanisms and their usesSulphonamides, mechanisms and their uses
Sulphonamides, mechanisms and their usesVijayaLaxmi84
 

Último (20)

Q-Factor General Quiz-7th April 2024, Quiz Club NITW
Q-Factor General Quiz-7th April 2024, Quiz Club NITWQ-Factor General Quiz-7th April 2024, Quiz Club NITW
Q-Factor General Quiz-7th April 2024, Quiz Club NITW
 
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...Team Lead Succeed – Helping you and your team achieve high-performance teamwo...
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...
 
PART 1 - CHAPTER 1 - CELL THE FUNDAMENTAL UNIT OF LIFE
PART 1 - CHAPTER 1 - CELL THE FUNDAMENTAL UNIT OF LIFEPART 1 - CHAPTER 1 - CELL THE FUNDAMENTAL UNIT OF LIFE
PART 1 - CHAPTER 1 - CELL THE FUNDAMENTAL UNIT OF LIFE
 
Comparative Literature in India by Amiya dev.pptx
Comparative Literature in India by Amiya dev.pptxComparative Literature in India by Amiya dev.pptx
Comparative Literature in India by Amiya dev.pptx
 
4.11.24 Poverty and Inequality in America.pptx
4.11.24 Poverty and Inequality in America.pptx4.11.24 Poverty and Inequality in America.pptx
4.11.24 Poverty and Inequality in America.pptx
 
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptx
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptxDecoding the Tweet _ Practical Criticism in the Age of Hashtag.pptx
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptx
 
How to Uninstall a Module in Odoo 17 Using Command Line
How to Uninstall a Module in Odoo 17 Using Command LineHow to Uninstall a Module in Odoo 17 Using Command Line
How to Uninstall a Module in Odoo 17 Using Command Line
 
Scientific Writing :Research Discourse
Scientific  Writing :Research  DiscourseScientific  Writing :Research  Discourse
Scientific Writing :Research Discourse
 
Indexing Structures in Database Management system.pdf
Indexing Structures in Database Management system.pdfIndexing Structures in Database Management system.pdf
Indexing Structures in Database Management system.pdf
 
6 ways Samsung’s Interactive Display powered by Android changes the classroom
6 ways Samsung’s Interactive Display powered by Android changes the classroom6 ways Samsung’s Interactive Display powered by Android changes the classroom
6 ways Samsung’s Interactive Display powered by Android changes the classroom
 
Paradigm shift in nursing research by RS MEHTA
Paradigm shift in nursing research by RS MEHTAParadigm shift in nursing research by RS MEHTA
Paradigm shift in nursing research by RS MEHTA
 
CARNAVAL COM MAGIA E EUFORIA _
CARNAVAL COM MAGIA E EUFORIA            _CARNAVAL COM MAGIA E EUFORIA            _
CARNAVAL COM MAGIA E EUFORIA _
 
DiskStorage_BasicFileStructuresandHashing.pdf
DiskStorage_BasicFileStructuresandHashing.pdfDiskStorage_BasicFileStructuresandHashing.pdf
DiskStorage_BasicFileStructuresandHashing.pdf
 
Mattingly "AI & Prompt Design" - Introduction to Machine Learning"
Mattingly "AI & Prompt Design" - Introduction to Machine Learning"Mattingly "AI & Prompt Design" - Introduction to Machine Learning"
Mattingly "AI & Prompt Design" - Introduction to Machine Learning"
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 11 THEO ĐƠN VỊ BÀI HỌC - CẢ NĂM - CÓ FILE NGHE (GLOB...
BÀI TẬP BỔ TRỢ TIẾNG ANH 11 THEO ĐƠN VỊ BÀI HỌC - CẢ NĂM - CÓ FILE NGHE (GLOB...BÀI TẬP BỔ TRỢ TIẾNG ANH 11 THEO ĐƠN VỊ BÀI HỌC - CẢ NĂM - CÓ FILE NGHE (GLOB...
BÀI TẬP BỔ TRỢ TIẾNG ANH 11 THEO ĐƠN VỊ BÀI HỌC - CẢ NĂM - CÓ FILE NGHE (GLOB...
 
Shark introduction Morphology and its behaviour characteristics
Shark introduction Morphology and its behaviour characteristicsShark introduction Morphology and its behaviour characteristics
Shark introduction Morphology and its behaviour characteristics
 
Satirical Depths - A Study of Gabriel Okara's Poem - 'You Laughed and Laughed...
Satirical Depths - A Study of Gabriel Okara's Poem - 'You Laughed and Laughed...Satirical Depths - A Study of Gabriel Okara's Poem - 'You Laughed and Laughed...
Satirical Depths - A Study of Gabriel Okara's Poem - 'You Laughed and Laughed...
 
Spearman's correlation,Formula,Advantages,
Spearman's correlation,Formula,Advantages,Spearman's correlation,Formula,Advantages,
Spearman's correlation,Formula,Advantages,
 
Man or Manufactured_ Redefining Humanity Through Biopunk Narratives.pptx
Man or Manufactured_ Redefining Humanity Through Biopunk Narratives.pptxMan or Manufactured_ Redefining Humanity Through Biopunk Narratives.pptx
Man or Manufactured_ Redefining Humanity Through Biopunk Narratives.pptx
 
Sulphonamides, mechanisms and their uses
Sulphonamides, mechanisms and their usesSulphonamides, mechanisms and their uses
Sulphonamides, mechanisms and their uses
 

Cmis 102 Success Begins / snaptutorial.com

  • 1. CMIS 102 Homework 1 Solution (100% Correct) For more classes visit www.snaptutorial.com Introduction to Problem Solving and Algorithm Design Using the above Code of Ethics, Pick at least 2 of the 8 principles and describe what these principles mean to you. In your write-up, summarize the principles you selected in your own words and provide at least one example of an activity or action you could take that would support each principle and one example of an activity or action that you believe would violate each principle. Be sure your document is well-written with minimal grammatical and spelling issues. ********************************************************** CMIS 102 Homework 2 Test Case Creation Using the following pseudocode (100% Correct) For more classes visit
  • 2. www.snaptutorial.com Homework 2 – Test Case Creation Using the following pseudocode, provide 3 unique test cases that would help validate your algorithm. Be sure to place the test cases in a table showing the input https://www.coursehero.com/tutors-problems/Computer- Science/10754291-I-need-help-with-c-coding-asap-how-much-will-it- be/zvalues, and expected output for each test case. Write &quot;Enter the price in dollars:&quot; Input Price Write &quot;Enter state sales tax(e.g. .06) :&quot; Input SalesTax Set Price = Price + (Price * SalesTax) Write &quot;Price with Tax is&quot; + Price Submit your word or PDF file to your assignments folder no later than the due date. Grading guidelines Submission A minimum of 3 test cases were provided. Input provided and explained for each test case. Expected output provided and explained for each test case.
  • 3. Test cases represent a wide variety of possible input values (e.g. large numbers, small numbers (0), negative, or unexpected non-number entries). Total Points 2 1 1 1 5 ********************************************************** CMIS 102 Homework 3 (100% Correct) For more classes visit www.snaptutorial.com Create your own unique While-End or (For End) repetition C code. You decide the theme. Be sure to provide an overview of what your repetition
  • 4. structure is doing. Please keep the design simple for this exercise. Just a few lines of code is all that is needed for this response. This should be code you wrote for an application that is interesting to you. In other words, make it your own and have fun with it. Provide the C code and a screen capture showing the results of testing your code in an online compiler. Be sure to test your code with several test cases and show your test case table ********************************************************** CMIS 102 Homework 4 Create your own Function For more classes visit www.snaptutorial.com Create your own function in C that accepts one input parameter and returns a float number. You decide the theme. You should provide both your C code and an example call to the C code function. Be sure to provide an overview of what your function is doing. Provide a screen capture showing the results of testing your code in an online compiler.
  • 5. Be sure to test your code with several test cases and show your test case table. Submit your word or PDF file to your assignments folder no later than the due date. ********************************************************** CMIS 102 Week 1 Hands-On Lab For more classes visit www.snaptutorial.com CMIS 102 Week 1 Hands-On Lab This hands-on lab demonstrate a simple sequential print statements using an online C compiler such as ideone.com. You should follow the instructions to complete the lab as well as perform the learning exercises at the end of this lab. Instructions 1. Open up any online C compiler (e.g ideone.com). 2. Be sure the C Language is selected.
  • 6. 3. Enter the code below into the editor. (Note: LEO doesn’t let you just copy and paste from this document so you can either download the document and then copy and paste or just go to the Code for HelloWorld link for this week and copy and paste from there.) 4. Click the submit, or run button. 5. Try the additional learning exercises on the next page. Here is what Hello, World! Looks like using ideone.com after it has successfully run Hello, World C code 1 2 3 4 5 6 #include <stdio.h> int main(void) { printf("Hello, World!"); return 0; } Learning Exercises for you to complete 1. Remove the semi-colon (;) at the end of this statement: 1 printf("Hello, World!");
  • 7. 2. Describe what happens. Why is the semi-colon needed? 3. What happens if you add another printf statement such as: 1 printf("Goodbye"); after the printf("Hello, World!"); line? 4. Describe the new output. Be sure to support your description with screen captures of executing the new code. 5. Experiment by adding additional printf statements to your code such as: 1 2 printf("Goodbye n"); printf("Hello, again! n"); 6. What does the “n” do to the output? ********************************************************** CMIS 102 Week 2 Hands-On Lab For more classes visit www.snaptutorial.com CMIS 102 Week 2 Hands-On Lab
  • 8. 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. Program Description This program will sum two integer numbers to yield a third integer number. Once the calculations are made the results of all the numbers will be printed to the output screen. Analysis We will use sequential programming statements. We will define 3 integer numbers: a, b, c. c will store the sum of a and b. Test Plan To understand this program the following input numbers could be used for testing: a = 10 b = 20 c = a + b = 10 + 20 = 30 In table format the following results are expected: Learning Exercises for you to complete 1. Change the C code to calculate the product of two integers as opposed to the sum of two integers. Support your experimentation with a screen capture of executing the new code.
  • 9. 2. Prepare a new test table with at least 3 distinct test cases listing input and expected output for the product of two integers. 3. Change the C code to calculate the quotient (e.g. a/b) of two floats (e.g. 2.3/1.5).Hint: Use float variable types as opposed to integers. What happens if the denominator is 0.0? Support your experimentation with screen captures 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 quotient of two floats. Submission • Submit a neatly organized word (or PDF) document that demonstrates you successfully executed this lab on your machine using an online compiler. You should provide a screen capture of the resulting output. • Also, provide the answers, associated screen captures, C Code and descriptions of your successful completion of learning exercises 1, 2, 3 and 4. • The answers to the learning exercises, screen captures, C code and descriptions can be included in the same neatly organized document you prepared as you ran this lab. Note the code can be embedded in the word document. However; be sure all code compiles and runs perfectly before submitting the document. • Submit your document no later than the due date listed in the syllabus or calendar.
  • 10. ********************************************************** CMIS 102 Week 3 Hands-On Lab For more classes visit www.snaptutorial.com CMIS 102 Week 3 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, pseudocode visualization, and implementation with C code. The example provided uses mathematical operators and variable types. Program Description This program will calculate the area of a right triangle. The program will ask the user to enter the base and height and then use these values to calculate and then print the area of the triangle. The design step will include pseudocode. Analysis I will use sequential programming statements. I will define two float numbers for the base and height: base, height. Float numbers were
  • 11. selected as opposed to integers to make sure triangles of all dimensions are possible and not just whole numbers. Float number will store the area: area The area will be calculated by this formula: Area = ½ * (base * height) For example if the base was 4.2 and the height was 5.3 the area would be calculated as: Area = ½ * (4.2 * 5.3) = ½ * (22.26) = 11.13 Test Plan To verify this program is working properly the following base and height values could be used for testing: Learning Exercises to be complete (Setting up the code and the input parameters in ideone.com:) 1. Change the C code to calculate the perimeter of a triangle. Support your experimentation with a screen capture of executing the new code 2. Prepare a new test table with at least 3 distinct test cases listing input and expected output for the perimeter of a triangle. 3. What is this line of code doing? 1 scanf("%f", &height); 4. How would you change this line if you wanted to input an Integer as opposed to a float? 5. What are the values of f and g after executing the following C?
  • 12. ********************************************************** CMIS 102 Week 4 Hands-On Lab For more classes visit www.snaptutorial.com CMIS 102 Hands-On Lab 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 sum
  • 13. of 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 &gt; 100 then print &quot;Sum is over 100&quot; End If Test Plan To verify this program is working properly the input values could be used for testing:
  • 14. 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
  • 15. //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
  • 16. “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 &gt; 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 &lt;stdio.h&gt; int main () 2 { /* variable definition: */
  • 17. int value1,value2,value3,value4,value5,sum; /* Initialize sum */ sum = 0; printf(&quot;Enter an Integer scanf(&quot;%d&quot;, &amp;value1); printf(&quot;Enter an Integer scanf(&quot;%d&quot;, &amp;value2); printf(&quot;Enter an Integer scanf(&quot;%d&quot;, &amp;value3); printf(&quot;Enter an Integer scanf(&quot;%d&quot;, &amp;value4); printf(&quot;Enter an Integer scanf(&quot;%d&quot;, &amp;value5); for value1n&quot;); for value2n&quot;); for value3n&quot;); for value4n&quot;); for value5n&quot;); sum = value1 + value2 + value3 + value4 + value5; printf(&quot;Sum is %dn &quot; , sum ); if (sum &gt;100) printf(&quot;Sum is over 100n&quot;); return 0; } Setting up the code and the input parameters in ideone.com:
  • 18. 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
  • 19. 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 lab on 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.
  • 20. 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
  • 21. and grammatical errors. Total Points 2 2 2 1 2 1 10 6 ********************************************************** CMIS 102 Week 5 Hands-On Lab For more classes visit www.snaptutorial.com CMIS 102 Week 5 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 (using pseudocode), and implementation with
  • 22. C code. The example provided uses sequential, selection and repetition statements. Program Description This program will calculate the average of 10 positive integers. The program will ask the user to 10 integers. If any of the values entered is negative, a message will be displayed asking the user to enter a value greater than 0. The program will use a loop to input the data. Analysis I will use sequential, selection and repetition programming statements. I will define two integer numbers: count, value and sum. count will store how many times values are entered. value will store the input. Sum will store the sum of all 10 integers. I will define one double number: avg. avg will store the average of the ten positive integers input. The sum will be calculated by this formula: Learning Exercises for you to complete 1. Change the code to average 20 integers as opposed to 10. Support your experimentation with screen captures of executing the new code. 2. 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. 3. What happens if you entered a value other than an integer? (For example a float or even a string). Support your experimentation with screen captures of executing the code. 4. Modify the code to allow the user to enter an unspecified number of positive integers and calculate the average. In other words, the user could enter number of positive integers. (Hint: You can prompt the user for how many they want to enter. Or; you could use a sentinel value to
  • 23. trigger when the user has completed entering values). You may need to conduct some research on your own to solve this problem. Prepare a new test table with at least 3 distinct test cases listing input and expected output for the code you created. Support your experimentation with screen captures of executing the new code ********************************************************** CMIS 102 Week 6 Hands-On Lab For more classes visit www.snaptutorial.com 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 uses sequential, repetition statements and nested repetition statements. Program Description
  • 24. This 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. Analysis I will use sequential and repetition programming statements. I will define one String to store the student name: StudentName. I will define three Float numbers: Examvalue, Sum, Avg to store exam values the sum of the exams and the average of the exams. The sum will be calculated by this formula: Sum = Sum + Examvalue For 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 sum = 80.0 + 90.0 = 170.0 sum = 170.0 + 100.0 = 270.0 Avg is then calculated as: Avg = sum/3.0 For example 270.0/3.0 = 90.0 A nested repetition loop can be used to loop through each of the 5 students and each of the 3 exams: For (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
  • 25. To verify this program is working properly the input values could be used for testing: Learning Exercises for you to complete 1. 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. 2. 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. 3. What is the line of code doing? charStudentName[100]; (Hint: We haven’t covered arrays, but a String can be thought of as an array of characters) ? 4. What would happen if you moved the Set Sum = 0.0 from inside the for loop to right after the declaration. For example: // Declare variables Declare StudentName as String Declare ExamValue, Sum, Avg as Float // Initialize Sum Set Sum = 0.0; Support your experimentation with screen captures of executing the new code. ********************************************************** CMIS 102 Week 7 Hands-On Lab
  • 26. For more classes visit www.snaptutorial.com 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 uses sequential, repetition, selection statements and two user-defined function. Program Description This 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 calculate the square of the cube of the number. Based on the inputs of the user, the program will output the 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’s original choice. The program will continue to prompt the user for
  • 27. Integers and their calculation choice until the user enters a negative integer. The square and cube calculations should be calculated using a function. Analysis I will use sequential, selection, and repetition programming statements and functions for the cube and square 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. The 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 For example: if 10 was entered as the IntValue. Results = 10*10 = 100 The Cube function will take one Integer as input and return one Integer as the output. The calculation within the Cube function is: Results = IntValue * IntValue*IntValue For example: if 10 was entered as the IntValue. Results = 10*10*10 = 1000 A repetition loop can be used to loop through iterations until a negative is entered: Learning Exercises for you to complete 1. Using the Square and Cube functions as models, Create an application that includes a function named “Shrink” that would take an Integer and return the Integer divided by 2? (Hint: your returned value should
  • 28. probably be a double type.) Support your experimentation with screen captures of executing the new code. 2. 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. 3. 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. 4. 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. ********************************************************** CMIS 102 Week 8 Hands-On Lab For more classes visit www.snaptutorial.com CMIS 102 Week 8 Hands-On Lab
  • 29. Overview: This hands-on lab allows you to follow and experiment with the critical steps of developing a program including the program description, Analysis, Design(program design, pseudocode), Test Plan, and implementation with C code. The example provided uses sequential, repetition, selection statements, functions, strings, and arrays. Program Description: This program will input and store meteorological data into an array. The program will prompt the user to enter the average monthly rainfall for a specific region and then use a loop to cycle through the array and print out each value. The program should store up 5 years of meteorological data. Analysis: I will use sequential, selection, and repetition programming statements and an array to store data. I will define a 2-D array of Float number: Raindata[][] to store the Float values input by the user. To store up to 5 years of monthly data, the array size should be at least 5*12 = 60 elements. A float number (rain) will also be needed to input the individual rain data. An integer variable (Count) is needed to keep count of how many rain data elements were entered. This will keep track to make sure we don’t go over 60 and we print only valid rain elements. In a 2D array this will be RainData[5][12]. We can use #defines to set the number of years and months to eliminate hard coding values.
  • 30. A float number (rain) will also be needed to input the individual rain data. A nested for loop can be used to iterate through the array to enter Raindata. A nested for loop can also be used to print the data in the array. A array of strings can be used to store year and month names. This will allow a tabular display with labels for the printout. Functions will be used to separate functionality into smaller work units. Functions for displaying the data and inputting the data will be used. A selection statement will be used to determine if data should be entered. Learning Exercises for you to try: 1. Modify the program to add a function to sum the rainfall for each year (Hint: you need to sum for each year. You can do this using a looping structure) Support your experimentation with screen captures of executing the new code 2. Enhance the program to allow the user to enter another meteorological element such as windspeed (e.g. 2.4 mph). Note, the user should be able to enter both rainfall and windspeed in your new implementation. Support your experimentation with screen captures of executing the new code. 3. Prepare a new test table with at least 2 distinct test cases listing input and expected output for the code you created after step 2 4. What happens if you change the NUMMONTHS and NUMYEARS de finitions to other values? Be sure to useboth lower and higher values. Describe and implement fixes for any issues if errors results. Support your experimentation with screen captures of executing the new code.