You have been assigned to write a software to convert between km per hour and meter...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
You have been assigned to write a software to convert between km per hour and meter per sec. The software should fulfill the following criteria: i. Receive either m/sec or km/hour and leave 0 for the other. Exit program if both inputs are 0 and print out error message if the unit entered is not valid. ii. A function called kmh_to_msec() to convert km/hour value to m/sec and function called msec_to_lamh () to convert m/sec value to km/hour. Parameter for both functions used pass-by-reference technique. An example of the output is as illustrated in Figure Q3: OUTPUT CONSOLE Enter m/s or km/h and leave 0 for the other, both 0 to exit. Enter m/s:0 [enter] Enter km/h:14 [enter] 14 km/h = 3.89 m/s. Enter m/s or km/h and leave 0 for the other, both 0 to exit. Enter /s:100 [enter] Enter km/h:0 (enter] 100 m/= 360.00 km/h. Enter a/s or km/h and leave 0 for the other, both to exit. Enter m/s:1 [enter] Enter km/h:1 [enter] Please enter either km/h or m/s. Enter m/s or km/h and leave 0 for the other, hath 0 to exit. Enter m/s:0 [enter] Enter km/h:0 (enter] ... Program finished with exit code 0 Figure Q3: Output sample Based on the following requirement, you must: (a) Identify input variable(s) and output variable(s) for this problem. [CI, SP1] (b) Draw the flowchart for the program. [C2, SP4] (c) Write the complete program. [C3, SP4] [2 marks] [9 marks] [14 marks] You have been assigned to write a software to convert between km per hour and meter per sec. The software should fulfill the following criteria: i. Receive either m/sec or km/hour and leave 0 for the other. Exit program if both inputs are 0 and print out error message if the unit entered is not valid. ii. A function called kmh_to_msec() to convert km/hour value to m/sec and function called msec_to_lamh () to convert m/sec value to km/hour. Parameter for both functions used pass-by-reference technique. An example of the output is as illustrated in Figure Q3: OUTPUT CONSOLE Enter m/s or km/h and leave 0 for the other, both 0 to exit. Enter m/s:0 [enter] Enter km/h:14 [enter] 14 km/h = 3.89 m/s. Enter m/s or km/h and leave 0 for the other, both 0 to exit. Enter /s:100 [enter] Enter km/h:0 (enter] 100 m/= 360.00 km/h. Enter a/s or km/h and leave 0 for the other, both to exit. Enter m/s:1 [enter] Enter km/h:1 [enter] Please enter either km/h or m/s. Enter m/s or km/h and leave 0 for the other, hath 0 to exit. Enter m/s:0 [enter] Enter km/h:0 (enter] ... Program finished with exit code 0 Figure Q3: Output sample Based on the following requirement, you must: (a) Identify input variable(s) and output variable(s) for this problem. [CI, SP1] (b) Draw the flowchart for the program. [C2, SP4] (c) Write the complete program. [C3, SP4] [2 marks] [9 marks] [14 marks]
Expert Answer:
Answer rating: 100% (QA)
Q a The input variables are the entered value which is kmperhour and meterpersec and the ... View the full answer
Related Book For
Posted Date:
Students also viewed these computer network questions
-
1. Identify 5 key takeaways from the negotiation class that's new to you, change your perspective and way of doing things in negotiation situation. 2. Conclude by explaining how those 5 key takeaways...
-
1. Hannah is applying for a life policy on her girlfriend Sarahs life. The policy is $500,000 and carries a large premium. Hannah is the main earner, so she is concerned about not being able to pay...
-
You have been assigned to review the internal controls of the credit department of a recently acquired subsidiary. The subsidiary imports several lines of microcomputers and sells them to retail...
-
Jontil Co. began the current period with a $14,000 balance in the Peter Jontil, Capital account. At the end of the period, the company's adjusted account balances include the following temporary...
-
A uniform cable weighing 3 lb/ft is held in the position shown by a horizontal force P applied at B. Knowing that P=180 lb and A =60, determine (a) The location of Point B, (b) The length of the...
-
1. Using the concept of varieties of capitalism, in which countries would you expect Uber to be most successful and in which less so? 2. What are the costs and benefits of Ubers aggressive approach...
-
In complexity science, the movement of an organization as it changes from one attractor or mission statement to another is known as: A. Leverage. B. Bifurcation. C. Chaos. D. Order.
-
Inventory Errors At December 31, 2010, Dwight Corporation reported current assets of $390,000 and current liabilities of $200,000. The following items may have been recorded incorrectly. Dwight uses...
-
Describe the promotion mix (promotion tools or promotion methods) for maybelline foundatiion finder and explain why we choose these(the pros and cons of each) Advertising, Public relations, personal...
-
Health Valley Hospital provides comprehensive services, including cancer, heart, trauma, and emergency services. It has 2,300 full-time employees. For eight years, Health Valley has had a...
-
true / false without justification The development and mastery of digital computing and communications technology is at the heart of the newly emerging global digital economy we call e-commerce. true...
-
It is often said that one year for humans is equivalent to about seven years for a dog, but this is not altogether true. First of all, dogs mature a great deal in their first year: a one-year old dog...
-
Milani, Incorporated, acquired 1 0 percent of Seida Corporation on January 1 , 2 0 2 3 , for $ 1 9 0 , 0 0 0 and appropriately accounted for the investment using the fair - value method. On January 1...
-
After the accounts have been adjusted at March 31, the end of the fiscal year, the following balances were taken from the ledger of Cabriolet Services Co.: Retained Earnings Dividends Fees Earned...
-
TIENDAS DI NAPOLI Tiendas Di Napoli is a renowned department store chain located in the central area of Chile. Over time it has incorporated new technologies and has also maintained certain things...
-
A shop owner uses a reorder point approach to restocking a certain raw material. Lead time is 10 days. Usage of the material is normally distributed with a mean of 80 pounds per day and a daily...
-
Do research in following topic Normalization is used to reduce inconsistency, errors, and redundancy in in Relational Databases. How NoSQL databases (You can use MongoDB as example) achieve the same...
-
Cobb Manufacturing Company uses a process cost system and average costing. The following production data is for the month of June 2011. Production Costs Work in process, beginning of the month:...
-
On January 1, 2013, Houston Inc., a public company located in Toronto that imports and distributes various teas and tea products and accessories, acquired all of the common shares of Persia...
-
Retic Ltd. acquired 100% of the share capital of Dorado Ltd. for $102,000 on January 1, 2011, when the equity of Dorado consisted of: Share capital50,000 shares........ $50,000 Retained earnings...
-
The following transactions pertain to the March 31, 2013, year end, for a province reporting in accordance with the CICA PSA Handbook: 1. Assume the accrual for the year-end estimate of income tax...
-
Who trades with the United States?
-
What factors might explain the differential in average income between men and women?
-
Decisions as to the allocation of human organs for transplant are based on characteristics such as blood type, weight, and age;urgency of need; and length of time on the waiting list (quoted from the...
Study smarter with the SolutionInn App