Design a program that allows the user to guess

Assignment Help Software Engineering
Reference no: EM132715837

Question: A concrete channel to bring water to Crystal Lake is being designed. It will have vertical walls and be 15 feet wide. It will be 10 feet deep, have a slope of .0015 feet/foot, and a roughness coefficient of .014. How deep will the water be when 1,000 cubic feet per second is flowing through the channel?

To solve this problem, we can use Manning's equation
Q = 1.486
N
AR2>3
S1>2

where Q is the flow of water (cubic feet per second), N is the roughness coefficient (unitless), A is the area (square feet), S is the slope (feet/foot), and R is the hydraulic radius (feet). The hydraulic radius is the cross-sectional area divided by the wetted perimeter. For square channels like the one in this example,
Hydraulic radius = depth * width>(2.0 * depth + width)

To solve this problem, design a program that allows the user to guess a depth and then calculates the corresponding flow. If the flow is too little, the user should guess a depth a little higher; if the flow is too high, the user should guess a depth a little lower. The guessing is repeated until the computed flow is within 0.1% of the flow desired.

To help the user make an initial guess, the program should display the flow for half the channel depth. Note the example run: At a depth of 5.0000 feet, the flow is 641.3255 cubic feet per second. Enter your initial guess for the channel depth when the flow is 1000.0000 cubic feet per second
Enter guess> 6.0
Depth: 6.0000 Flow: 825.5906 cfs Target: 1000.0000 cfs
Difference: 174.4094 Error: 17.4409 percent
Enter guess> 7.0
Depth: 7.0000 Flow: 1017.7784 cfs Target: 1000.0000 cfs
Difference: -17.7784 Error: -1.7778 percent
Enter guess> 6.8

Reference no: EM132715837

Questions Cloud

Steps of the company strategic planning process : The following is data related to the establishment of new businesses in 2020. PT. SBI was founded in June 2020 which includes businesses that have been previous
How should the loan be presented on upcoming balance sheet : If the borrowing occurred one month prior to year-end, how should the loan be presented on the upcoming balance sheet
Does higher quality increase productivity : Does higher quality (producing a good or service with less mistakes/rejects) increase productivity? Explain your answer.
What would be the expected total cost of manufacturing : Variable overheads $3120, Fixed overheads $14,640. What would be the expected total cost of manufacturing 2300 units of the product in a period?
Design a program that allows the user to guess : How deep will the water be when 1,000 cubic feet per second is flowing through the channel and design a program that allows the user to guess a depth
Determine which costs would not be classified as production : Determine Which costs would NOT be classified as a production overhead cost in a food processing company? The cost of renting the factory building
How many units of Product A must be produced during month : On November 1, Barnes Corporation has 8,000 units of product A on hand. How many units of Product A must be produced during the month
Describe the floor control and scheduling in mrp : Describe the Floor control and scheduling in Mrp?
Compute labor and multifactor productivity : A firm is engaged in entering data using web-based software. The job is to enter data from a type of form. The firm gets taka 21.00 for each of the entered form

Reviews

Write a Review

Software Engineering Questions & Answers

  Compare agile and waterfall models of managing a project

Compare and contrast agile and Waterfall models of managing a project in the context of building an e-Commerce Website

  Explain an efficient parallel algorithm

Think about an n-element list in an n-processor EREW parallel random-access machine, where some elements of the list are marked as being blue.

  Explain the relationship between observation law and theory

The following diagram is from the text. Clearly and thoroughly explain the relationship between observation, law and theory. Illustrate your answer with examples - with at least one from software engineering.

  Develop a small console program for sab

Understanding of various programming languages' features - comparative languages course, you will be creating the same application in the programming

  Predict challenges of cost estimation for software projects

Predict the challenges of cost estimation for software development projects where requirements are usually not clear in early stages of the project.

  Describe five things that might be included in the model

Select the model you think would be best for this system and explain your choice.

  How does each relate to the ptop process presented

Select three application control plans presented. How does each relate to the PtoP process presented in given Figure?

  Describe the seven step sdlc model

Describe the 7 Step SDLC - 2 pages, Describe a different SDLC Model (4 step or 12 step) - 2 pages, Compare and contrast the 7 Step Model and the second model you selected (4 step or 12 step) - 1 page.

  Explain process that take place in each phase of life cycle

Explain the processes that take place in each phase of the life cycle and determine what will be accomplished in each. Determine the requirements for the development of the online course management system.

  Connect the devices according to the topology

Connect the devices according to the topology given - Create VLAN 1 interfaces in SW1 and SW2 using the IP shown in the topology

  1who start to introduce 4ps2who used 4ps3a lot of

1who start to introduce 4ps?2who used 4ps?3a lot of researches used 4ps44ps also being used in the education5start to

  How architecting systems provide a means to deliver product

Explain how architecting systems provide a means to deliver a product that was in line with the requirements based on the information you gathered from the three cases.

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