1 write an algorithm that converts a linear measurement in

Assignment Help Application Programming
Reference no: EM13379912

1. Write an algorithm that converts a linear measurement in feet and inches into meters. One inch is equivalent to 2.54 centimeters.

Algorithm:

1. Prompt user for LengthInFeet.

2. Get LengthInFeet.

3. Prompt user for LengthInInches.

4. Get LengthInInches.

5. LengthInMeters = ((LengthInFeet * 12) + LengthInInches) * 2.54 / 100.

6. Display LengthInMeters.

IPO Chart:

Input

LengthInFeet

LengthInInches

Processing

Get LengthInFeet and LengthInInches

Calculate ((LengthInFeet * 12) + LengthInInches) * 2.54 / 100

Save the result in LengthInMeters

Display LengthInMeters

Output

LengthInMeters

Test Data:

 

LengthInFeet

LengthInInches

LengthInMeters

Data set 1

5

10

1.778

Data set 2

38

7

11.7602

Data set 3

6

0

1.8288

Desk Check with first set of data

Step

LengthInFeet

LengthInInches

LengthInMeters

1

?

?

?

2

5

?

?

3

5

?

?

4

5

10

?

5

5

10

1.778

6

5

10

1.778

Desk Check with second set of data

Step

LengthInFeet

LengthInInches

LengthInMeters

1

?

?

?

2

38

?

?

3

38

?

?

4

38

7

?

5

38

7

11.7602

6

38

7

11.7602

Desk Check with third set of data

Step

LengthInFeet

LengthInInches

LengthInMeters

1

?

?

?

2

6

?

?

3

6

?

?

4

6

0

?

5

6

0

1.8288

6

6

0

1.8288

Practice with Selection

4. Write an algorithm that can be used to calculate the commission earned in a real estate transaction. The chart below describes the formulas used to calculate the commission.

Sales Price

Commission

Less than $100,000

5% of Sales Price

$100,000 to $300,000

$5,000 + 10% of Sales Price over $100,000

More than $300,000

$25,000 + 15% of Sales Price over $300,000

Algorithm:

1. Prompt user for SalesPrice.

2. Get SalesPrice.

3. If SalesPrice< 100000

Commission = 0.05 * SalesPrice

Else If SalesPrice<= 300000

Commission = 5000 + (0.1 * (SalesPrice - 100000))

Else

Commission = 25000 + (0.15 * (SalesPrice - 300000))

4. Display Commission.

IPO Chart:

Input

SalesPrice

Processing

Get SalesPrice

If SalesPrice< 100000

Commission = 0.05 * SalesPrice

Else If SalesPrice<= 300000

Commission = 5000 + (0.1 * (SalesPrice - 100000))

Else

Commission = 25000 + (0.15 * (SalesPrice - 300000))

Output

Commission

Test Data:

 

SalesPrice

Commission

Data set 1

80000

4000

Data set 2

232000

18200

Data set 3

780000

97000

Data set 4

300000

25000

Desk Check with first set of data

Step

SalesPrice

Commission

1

?

?

2

80000

?

3

80000

4000

4

80000

4000

Desk Check with second set of data

Step

SalesPrice

Commission

1

?

?

2

232000

?

3

232000

18200

4

232000

18200

Desk Check with third set of data

Step

SalesPrice

Commission

1

?

?

2

780000

?

3

780000

97000

4

780000

97000

Desk Check with fourth set of data

Step

SalesPrice

Commission

1

?

?

2

300000

?

3

300000

25000

4

300000

25000

Reference no: EM13379912

Questions Cloud

Suppose that a vector processor has a memory system in : suppose that a vector processor has a memory system in which it takes 10 cycles to load a single 64-bit word from
Consider any of the supercomputing examples we discussed in : consider any of the supercomputing examples we discussed in class and find a scientific paper describing it. you must
In this assignment you are to write a program that analyzes : in this assignment you are to write a program that analyzes a selection of text counting the number of times each word
In this assignment you will write a program that does : in this assignment you will write a program that does simple packet routing. your program will take three command-line
1 write an algorithm that converts a linear measurement in : 1. write an algorithm that converts a linear measurement in feet and inches into meters. one inch is equivalent to 2.54
1 give an example to show that the group of permutations s5 : 1. give an example to show that the group of permutations s5 is not commutative.2. use ecb mode with block length 3 and
1 write a c program to display the following sum4 812162024 : 1. write a c program to display the following sum4 812162024 ...4042. write a program that will convert us dollar
Perform the tasks below by using the correct sql statements : perform the tasks below by using the correct sql statements. you must create the statements in oracle by using the
Modify oracle table data using the correct sql statements : modify oracle table data using the correct sql statements. you must create the statements in oracle by using the

Reviews

Write a Review

Application Programming Questions & Answers

  To design a class-based solution to a problem using

to design a class-based solution to a problem using multiple data structures.the problemwrite a program to help an

  Question 1 detail for each of the four following mips

question 1. detail for each of the four following mips instructions which actions are being taken at each of their

  Task design and implement 2 projects for the falling

task design and implement 2 projects for the falling letters game using c and windows presentation foundation wpf

  Problem 1nbsp in a town the percentage of men is 52the

problem 1nbsp in a town the percentage of men is 52.the percentage of total literacy is 48. if total percentage of

  Questions on programing problem step 1 we ask you to

questions on programing problem step 1 we ask you to produce a project plan and an interim description of the project

  Learning objectives1 identity the correspondence between a

learning objectives1. identity the correspondence between a grammar and a type.2. identify the correspondence between a

  Hubspot is currently at a crossroads with management

hubspot is currently at a crossroads with management looking for rapid acceleration of sales and profits. in their

  Electricity modellingit deals with electricity usage data

electricity modellingit deals with electricity usage data for 241 households in new zealand that was collected in

  Figure shows the graphic simulation of the elevatorthe

figure shows the graphic simulation of the elevator.the object of this assignment is to write a program that will drive

  Problem 1 write a program that will generate an array of 10

problem 1. write a program that will generate an array of 10 random 32-bit integers and that will show on the monitor

  Use ruby on rials to design app video store will be your

use ruby on rials to design app video store will be your project it has to have a database and at least 4 pages style

  1 here is a short program it prints out the value of a

1. here is a short program. it prints out the value of a variable x. ernie and bert disagree about what will be printed

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