ComputerScienceExpert

(11)

$18/per page/

About ComputerScienceExpert

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Applied Sciences,Calculus See all
Applied Sciences,Calculus,Chemistry,Computer Science,Environmental science,Information Systems,Science Hide all
Teaching Since: Apr 2017
Last Sign in: 103 Weeks Ago, 3 Days Ago
Questions Answered: 4870
Tutorials Posted: 4863

Education

  • MBA IT, Mater in Science and Technology
    Devry
    Jul-1996 - Jul-2000

Experience

  • Professor
    Devry University
    Mar-2010 - Oct-2016

Category > Programming Posted 03 May 2017 My Price 10.00

ritical steps of developing a program

 CMIS 102 Hands-On Lab

Week 2Overview

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:

Table attached

Design using Pseudocode

// This program will sum two integer numbers to yield a third integer number.

// It will also divide two float numbers to yield a third float number.

// Declare variables Declare a,b,c as Integer

// Set values of Integers

Set a=10

Set b=20

Set c= a + b

// Print a, b, c

Print a,b,c

C Code

The following is the C Code that will compile in execute in the online compilers.

// C code//

This program will sum two integer numbers to yield a third integer number.

// Developer: Faculty CMIS102

//Date: Jan 31, XXXX

#include <studio.h>

int main ()

{

/* variable definition: */

int a, b, c;

/* variable initialization */

a = 10;

b = 20;

c = a + b;

printf("Integers (a,b) and sum (c) are : %d,%d,%d n", a,b,c);

return 0;

}

Use ideone.com to run the programming

Learning Exercises for you to complete

1. Change the C code to calculate the product of two integers as opposed to the sum of twointegers. Then run the new code. Support your experimentation with a screen capture of thecode and a screen capture of the successful execution of 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. Include screen shots of the executions of all text table values working properly.

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.

Attachments:

Answers

(11)
Status NEW Posted 03 May 2017 04:05 AM My Price 10.00

-----------

Attachments

file 1493787495-Solutions file 2.docx preview (51 words )
H-----------ell-----------o S-----------ir/-----------Mad-----------am ----------- Th-----------ank----------- yo-----------u f-----------or -----------you-----------r i-----------nte-----------res-----------t a-----------nd -----------buy-----------ing----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n. -----------Ple-----------ase----------- pi-----------ng -----------me -----------on -----------cha-----------t I----------- am----------- on-----------lin-----------e o-----------r i-----------nbo-----------x m-----------e a----------- me-----------ssa-----------ge -----------I w-----------ill----------- be----------- qu-----------ick-----------ly -----------onl-----------ine----------- an-----------d g-----------ive----------- yo-----------u e-----------xac-----------t f-----------ile----------- an-----------d t-----------he -----------sam-----------e f-----------ile----------- is----------- al-----------so -----------sen-----------t t-----------o y-----------our----------- em-----------ail----------- th-----------at -----------is -----------reg-----------ist-----------ere-----------d o-----------n -----------THI-----------S W-----------EBS-----------ITE-----------. ----------- Th-----------ank----------- yo-----------u -----------
Not Rated(0)