Perimeter of rectangle and measurements in centimeters

Assignment Help Other Subject
Reference no: EM13162764

"Complete the following two programs:

Programming Problem 1

John wants to know the values of the area and perimeter of a rectangle. John can take measurements of the length and width of the rectangle in inches. John's measurements are expected to be accurate to within 0.1 inch. 

1. Identify the inputs and outputs of the problem.

2. Identify the processing needed to convert the inputs to the outputs.

3. Design an algorithm in pseudocode to solve the problem. Make sure to include steps to get each input and to report each output.

4. Identify two test cases, one using whole number values, and one using decimal number values. For each of the two test cases show what inputs you will use and what your expected outputs should be.

5. Write the program to implement your algorithm. Test your program using your test cases. Did your program produce the values predicted in your test cases? Explain.

Programming Problem 2

Shirlee is working with a measurement tool that reports measurements in centimeters. Since Shirlee is unfamiliar with centimeters, she would like her centimeter measurements to be converted into yards, feet, and inches. She would also like the result to be properly rounded to the nearest inch. As an example, if the measurement is 312 centimeters, this should be converted to 3 yards, 1 foot, and 3 inches. 

1. Identify the inputs and outputs of the problem.

2. Identify the processing needed to convert the inputs to the outputs. HINT: Convert centimeters to total number of inches first! (1 inch = 2.54 cm)

3. Design an algorithm in pseudocode to solve the problem. Make sure to include steps to get each input and to report each output.

4. Identify two test cases other than the example given above. For each of the two test cases show what inputs you will use and calculate what your expected outputs should be.

5. Write the program to implement your algorithm. Test your program using your test cases. Did your program produce the values predicted in your test cases? Explain.

For each of the two programming problems, create a program using Visual C++.Net. Make sure to capture a sample of your program's output. The best way to do this is to click on the console window you want to capture and then press the Alt and PrintScreen keys at the same time. Then paste your captured screen image into a Word document. For each of the two programs, put the screen capture followed by a copy of your source code into your Word document.

Your final programming document should contain in the following order:
1. Answers to all of the questions listed above.
2. Screen capture of the first program followed by source code.
3. Screen capture of the second program followed by source code.

Reference no: EM13162764

Questions Cloud

Massive-positively charged and nuclear particles : Which the following denotes the massive, positively charged, nuclear particles?
Get so mad when you just shrug them off like : I know people that get so mad when you just shrug them off like what they are saying does not matter. Even when you do not case for what someone has to say you still should not just shrug them off.
Self-conept chages : One of the most common ways our self-conept chages is
Process of ascribing the cause of an event to somthing : The process of ascribing the cause of an event to somthing
Perimeter of rectangle and measurements in centimeters : John wants to know the values of the area and perimeter of a rectangle. John can take measurements of the length and width of the rectangle in inches. John's measurements are expected to be accurate to within 0.1 inch.
The artha-sastra : The Artha-sastra.  used the analogy that big fish eat littler fish.  has been known to historians since the early 1500s.  was written by a minister serving the Gupta Empire.  held that “the enemy of my friend is my enemy”.
Document to monitor and control a project : What are some of the key environmental forces that have change the way project are managed? what has been the effect of these forces on the management of project?
Change trend : Why are businesses moving away from Blackberries and towards iPhones? What can Blackberry do to change this trend?
Failure can force people to strive to do their best : Failure can force people to strive to do their best because they fear failure but, on the flipside, failure can cause people to avoid even trying in the first place.

Reviews

Write a Review

Other Subject Questions & Answers

  Matlab and cubic spline coefficients

I have 4 x,y data points and 12 cubic spline coefficients, a1,a2,a3,b1,b2,b3,c1,c2,c3,d1,d2,d3. I need to use the coefficients to plot, in MATLAB, three spline segments that pass through the data points. I am not sure how to approach this.

  Strategic decision-making in public administration

Illustrat your opinion on the statement which the subjectivity of administrators is at work in their decision making?

  Describe a hypothetical example

Create and describe a hypothetical example that specifically illustrates how biology, family, and culture may contribute to and/or impact substance abuse and/or addiction.

  Separate personality and limited liability

Courts often say they will ignore the separate corporate entity where the business has sold something to another person on credit and it is now claimed that the separate personality of the corporation and it's perpetual existence means there is li..

  Cognitive-behavioral therapy

What are at least three benchmarks/observable meausres of client sucesses when using cognitive-behavioral therapy (CBT).

  Explain conflicts between ethics and laws

In terms of Illinois Law, what can you do for Isabel? Are there any conflicts between ethics and laws? Must you involve her parents?

  Perform a single-sample t-test to evaluate this hypothesis

Open "Data Set 7" attachment under "Excel Homework 7" header located in Assignment Instructions folder also perform a single-sample t-test to evaluate this hypothesis.

  Important of study public administration

Discuss the rationale behind creating new, separate disciplines of public administration and public policy. Do you believe that all public administrators should matriculate in a Masters in Public Administration program?

  Impression management for various people

Drawing on Erving Goffman's dramaturgical approach, discuss how the following groups engage in impression management:

  Implications of tax

A popular local actress agreed to sell her life story to a weekly magazine . Under the contract the actress was to be paid $ 25000 on signing the agreement and $ 75000 on completion of the manuscript .

  New testament and its modern interpretation

How do you understand the facts when reading the bible, that one must be aware of numerous differences in the literature, the historical time, and the expectations of the reader in the twenty first century?

  Singapore and china-finance and organization

Illustrate the difference between Singapore and China in terms of their finance and organization?

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd