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...
-
Some people say an organization could never be "prepared" for a disaster such as the shooting at Sandy Hook Elementary School, the Japan nuclear disaster, or the huge BP oil spill in the Gulf of...
-
The income statement and selected balance sheet information for Hamburger Heaven for the year ended December 31, 2013, are presented below. Refer to the information in CP12-2. Required: Prepare the...
-
Bond Back Clinic, Inc., started a business when Dr. Bond purchased \($8,000\) of stock in the business. Before starting operations, Bond Back Clinic, Inc., borrowed \($5,000\) cash by signing a note...
-
Lucile Bluth has been asked by the Board of Directors to provide a brief presentation at the upcoming meeting to identify the root cause of project G.O.B's challenges as well as identify a feasible...
-
Explain the three menu costing approaches widely used by restaurant managers. Apply theory in RM in Food and Beverage Operations
-
Auditor Changes at Daily Journal Corporation Charlie Munger is vice chairman of Berkshire Hathaway Inc. and is informally known as War- ren Buffett's "right arm." Munger also serves as chairman of...
-
What is the current ratio? Use the information below. Current Assets Inventory: Acct Rec Total Assets: Current Liabilities: Acct Payable: Total Liabilities: Owner's Equity $450,000 $250,000 $200,000...
-
A company manufactures three products using the same production process. The costs incurred up to the split-off point are $207,500. These costs are allocated to the products on the basis of their...
-
The process to manufacture custom machine parts involves two departments. Assume that manufacturing overhead is applied using direct labor hours in Department One and machine hours in Department Two....
-
Explain the IFRS treatment of event after reporting period and critique it.
-
HOW MANY WORKERS ARE NEEDED TO ACHIEVE TARGET LABOUR COST?
-
Prepare a depreciation schedule assuming actual mileage was: 2 0 2 2 , 2 4 0 0 0 ; 2 0 2 3 , 2 8 0 0 0 ; 2 0 2 4 , 2 3 0 0 0 ; 2 0 2 5 , 1 7 0 0 0
-
Calculate (i) Fixed overhead expenditure variance (ii) Fixed overhead volume variance (iii) Fixed overhead capacity variance (iiii) Fixed overhead efficiency variance
-
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...
-
Fill in the Blank. In the finite element method, \(a(n)\) ___________ solution is assumed within each element.
-
The stiffness matrix of a bar element is given by a. \(\frac{E A}{l}\left[\begin{array}{ll}1 & 1 \\ 1 & 1\end{array} ight]\) b. \(\frac{E A}{l}\left[\begin{array}{rr}1 & -1 \\ -1 & 1\end{array}...
-
What is the basis for the derivation of transformation matrices?
Study smarter with the SolutionInn App