answersLogoWhite

0


Best Answer

System-Level Requirements Example

Consider the Paint the Room program, in which you developed what are often called system-level requirements-the basis for all subsequent analysis and design steps. The following steps will take these system-level requirements and refine them into a detailed blueprint for the program.

Up to this point, you have identified the processes the program must perform, but you have not given any consideration to exactly how the processes work together to solve the problem. At this point, you must generate a description of the processing using pseudocode, a natural language description of the processing the application must perform.

The natural place to start is the system-level requirements you identified in the Input-Process-Output (IPO) chart. Determine how the processes work together: Once you have determined the top-level logic, you can then design each of the individual processes. It is this step-wise refinement process that allows you to conceptualize a vague problem into increasing levels of details in order to actually generate a working program. This point is important because the step-wise refinement pattern is used throughout the entire program development-each new piece of information is based on, and is a refinement of, the information uncovered in the previous step.

For this week's CheckPoint, you will refine the IPO table into a complete design, as demonstrated on pp. 33 and 36 of Extended Prelude to Programming: Concepts and Design (2nd ed.). Refer also to the Input and Output Process Example in Appendix B to see how more detailed analysis and design relates to the previously constructed IPO chart.

The following information demonstrates all the items you need to develop for your programming assignments and for the final project.

Analysis

Process:

1. Get user input

2. Find room area

3. Divide room area

4. Multiply gallons

5. Prompt for ounces

6. Display total

price (real: 0-100)

squareFeetPerGal (real: 0-1000)

width (real: 0-100)

length (real: 0-100)

height (real: 0-100)

Input:

Output:

total_cost (real: > 0)

Design

Main Module

Declare price as real

Declare squareFeetPerGal as real

Declare width as real

Declare length as real

Declare height as real

Declare totalArea as real

Declare gallonsNeeded as real

Declare outputPrompt as string

Declare totalCost as real

Get user input

Find room area

Divide room area

Multiply gallons

Display total

End Main Module

Input Data Module

Write, "What is the price per gallon of paint?"

Input price

Write, "How many square feet does each gallon cover?"

Input square_feet_per_gal

Write, "What is the height of the walls?"

Input height

Write, "What is the width of the walls?"

Input width

Write, "What is the length of the walls?"

Input length

End Input Data Module

Find Room Area Module

Declare sideArea as real

Declare frontBackArea as real

Declare ceilingArea as real

sideArea = 2*(length * height)

frontBackArea = 2*(width * height)

ceilingArea = width * length

totalArea = sideArea + frontBackArea + ceilingArea

End Find Room Area Module

User Avatar

Wiki User

13y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: CheckPoint Chapter 2 Programming Problem
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Basic Math

How do you write a fraction as a multiplication problem?

2/3 = 2 x 1/3


What is primal simplex method?

II. SIMPLEX ALGORITHM A. Primal Simplex Algorithm If the unconstrained solution space is defined in n dimensions (each dimension assumed to be infinite), each inequality constraint in the linear programming formulation divides the solution space into two halves. The convex shape defined in n-dimensional space after m bisections represents the feasible area for the problem, and all points which lie inside this space are feasible solutions to the problem. Figure 1 shows the feasible region for a problem defined in two variables, n = 2, and three constraints, m = 3. Note that in linear programming, there is an implicit non-negativity constraints for the variables. The linearity of the objective function implies that the the optimal solution cannot lie within the interior of the feasible region and must lie at the intersection of at least n constraint boundaries. These intersections are known as corner- point feasible (CPF) solutions. In any linear programming problem with n decision variables, two CPF solutions are said to be adjacent if they share n − 1 common constraint boundaries. When interpreted geometrically, the Simplex algorithm moves from one corner-point feasible solution to a better corner-point-feasible solution along one of the constraint boundaries. There are only a finite number of CPF solutions, although this number is potentially exponential in n, however it is not necessary to visit all of them to determine the optimal solution to the problem. The convex nature of linear programming means that there are no local maxima present in the problem which are not also global maxima. Hence if at some CPF solution, no improvement is made by a move to another adjacent CPF then the algorithm terminates and we can be confident that the optimal solution has been found.


What is the index notation of 294?

2 x 3 x 72 = 294 is the index form. Index notation refers to higher mathematics and computer programming.


What is 1 out of 5 the fraction problem?

1/5 = 0.2 or 20%


What is the prime factorization without exponents for the problem 12a if the a stands for a prime number?

2 x 2 x 3 x a

Related questions

What is the checkpoint?

2(2)2


In free rider 2 how do you place a checkpoint in a track?

When you select your checkpoint, simply just click where you want to add it.


What are the release dates for Border Wars - 2010 Checkpoint Texas 2-2?

Border Wars - 2010 Checkpoint Texas 2-2 was released on: USA: 1 September 2010


What are the two applications of dynamic programming?

1)Multistage graph 2)Travelling salesman problem


How do you respawnorama in Achievement Unlocked 2?

Respawn at every checkpoint.


How do you program 2002 Subaru Outback keyless remote?

See "Programming the Transmitters" on page 10 in chapter 2 "Keys and Doors" of your "OWNER'S MANUAL".....


How do you program a 2000 Subaru Outback key fob?

See "Programming the Transmitters" on page 10 of chapter 2 "Keys and Doors" in the "OWNER'S MANUAL".....


How do you go to a special stage on sonic 2?

run past a checkpoint with fifty rings, then, a ring will appear above the checkpoint, jump into the ring, and boom, your in the special stage


How do you get 2 player on Littlebigplanet ps3?

have 2 controllers on at the same time near a checkpoint or at your pod


Is there a certain amount of time that mushers have to stay at a checkpoint?

yes. example: every musher in the iditarod race can spend 24 hours only once at a checkpoint. so it would be a good idea when they are tired to stop at a checkpoint for 24 hours since they only get to do it once. they all have limited time at checkpoint. if u r confused, go 2 the iditarod website.


How do you save in Ultimate Alliance 2?

you have to reach the blue checkpoint and click the save button choice


How many episodes does naruto shippuden Ultimate Ninja Storm 2 have?

The game is divided in 9 chapters: Prologue Chapter 1 Chapter 2 Chapter 3 Chapter 4 Chapter 5 Chapter 6 Final Chapter Fragment