Ex1) IMPORTANT: You are required to provide preconditions and postconditions for each solution you provide. Ex...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Ex1) IMPORTANT: You are required to provide preconditions and postconditions for each solution you provide. Ex 0) as a starter, read the provided flowchart for a computer program to receive two numbers and output the larger one. Assume the two number are not same. Convince yourself that both versions work correctly. Ex2) Ex 3) Ex 4) 22w Lab04 N-convert... Page 2 of 8 Ex 5) draw a flowchart for a computer program to receive two numbers as sides of a rectangle and output the rectangle's perimeter, in the form of "Perimeter: x" where x is the perimeter. Save your work as img_01.jpg draw a flowchart for a computer program to receive three numbers and store them in memory spaces called a, b, and c as three semi-axes of an ellipsoid, and calculate and output the volume of this ellipsoid, in the form of "volume: x" where x is the volume. Figure out the formular from the internet. Save your work as img_02.jpg draw a flowchart for a computer program to receive three floating point numbers and store them in memory spaces called a, b, and c, and return the largest number of the three, in the form of "largest: x" where x is the largest value. Assume the three number are all different. Hint: you can compare pair of the values and there are several cases to consider, but a simpler way to compare is, as you see in the SMQ1, check if a is larger than b AND also is larger than c. If yes you got the answer. If not (else), check if b is larger than a AND also larger than c, if yes you got answer, if not, you also got the answer. If.... else if.... else should be enough. Save your work as img_03.jpg draw a flowchart to receive three numerical coefficients of a quadratic equation and determines if it has two distinct real roots, one root, or no roots in real numbers, output "it has 2 distinct roots, "its roots are identical", "it has no roots in real numbers" respectively. This page might be a good reference: https://www.math10.com/en/algebra/quadratic-equation.html Save your work as img_04.jpg assume there is a webpage containing an HTML input of type text and a button. When the button is clicked, a function named divisible By6 is called. Draw a flowchart for the function, that receive a number, and first check whether the input is divisible by 6 or not, outputting "divisible by 6" or "not divisible by 6", respectively. Then, further check if the input is zero, and if it is zero, also outputs "program ended". Hint: you need two if clauses, one after another. First check if the input is divisible by 6, and output accordingly, and then check if the input is 0 or not. Save your work as img_05.jpg. IMPORTANT RESTRICTION: you are not allowed to use the modulus 6 to verify the remainder whether the number is divided by 6. You can do any other math trick you wish. Ex 6A) draw a flowchart to receive a number from 0~100, and map it to a letter grade based on York standard. Use if.. else if.. else if... You may need to look at this reference: http://calendars.registrar.yorku.ca/2012-2013/academic/grades/index.htm To simplify, assume no letter grade E, i.e., if the grade is below 50, it's mapped to F. Save your work as img_06A.jpg. Ex 6B) draw a flowchart to receive a number from 0~100, and map it to a letter grade based on York standard. Use the "many case" style shown in class (which corresponds to switch cases struct in JS programming language). Again assume no letter grade E. Save your work as img_06B.jpg. Ex1) IMPORTANT: You are required to provide preconditions and postconditions for each solution you provide. Ex 0) as a starter, read the provided flowchart for a computer program to receive two numbers and output the larger one. Assume the two number are not same. Convince yourself that both versions work correctly. Ex2) Ex 3) Ex 4) 22w Lab04 N-convert... Page 2 of 8 Ex 5) draw a flowchart for a computer program to receive two numbers as sides of a rectangle and output the rectangle's perimeter, in the form of "Perimeter: x" where x is the perimeter. Save your work as img_01.jpg draw a flowchart for a computer program to receive three numbers and store them in memory spaces called a, b, and c as three semi-axes of an ellipsoid, and calculate and output the volume of this ellipsoid, in the form of "volume: x" where x is the volume. Figure out the formular from the internet. Save your work as img_02.jpg draw a flowchart for a computer program to receive three floating point numbers and store them in memory spaces called a, b, and c, and return the largest number of the three, in the form of "largest: x" where x is the largest value. Assume the three number are all different. Hint: you can compare pair of the values and there are several cases to consider, but a simpler way to compare is, as you see in the SMQ1, check if a is larger than b AND also is larger than c. If yes you got the answer. If not (else), check if b is larger than a AND also larger than c, if yes you got answer, if not, you also got the answer. If.... else if.... else should be enough. Save your work as img_03.jpg draw a flowchart to receive three numerical coefficients of a quadratic equation and determines if it has two distinct real roots, one root, or no roots in real numbers, output "it has 2 distinct roots, "its roots are identical", "it has no roots in real numbers" respectively. This page might be a good reference: https://www.math10.com/en/algebra/quadratic-equation.html Save your work as img_04.jpg assume there is a webpage containing an HTML input of type text and a button. When the button is clicked, a function named divisible By6 is called. Draw a flowchart for the function, that receive a number, and first check whether the input is divisible by 6 or not, outputting "divisible by 6" or "not divisible by 6", respectively. Then, further check if the input is zero, and if it is zero, also outputs "program ended". Hint: you need two if clauses, one after another. First check if the input is divisible by 6, and output accordingly, and then check if the input is 0 or not. Save your work as img_05.jpg. IMPORTANT RESTRICTION: you are not allowed to use the modulus 6 to verify the remainder whether the number is divided by 6. You can do any other math trick you wish. Ex 6A) draw a flowchart to receive a number from 0~100, and map it to a letter grade based on York standard. Use if.. else if.. else if... You may need to look at this reference: http://calendars.registrar.yorku.ca/2012-2013/academic/grades/index.htm To simplify, assume no letter grade E, i.e., if the grade is below 50, it's mapped to F. Save your work as img_06A.jpg. Ex 6B) draw a flowchart to receive a number from 0~100, and map it to a letter grade based on York standard. Use the "many case" style shown in class (which corresponds to switch cases struct in JS programming language). Again assume no letter grade E. Save your work as img_06B.jpg.
Expert Answer:
Related Book For
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill
Posted Date:
Students also viewed these programming questions
-
The following additional information is available for the Dr. Ivan and Irene Incisor family from Chapters 1-5. Ivan's grandfather died and left a portfolio of municipal bonds. In 2012, they pay Ivan...
-
You are required to write a Python program that will manage character (heroes and villain) information. Character (hero and villain) information will be stored in a text file that will be read in...
-
Umida Ltd is considering acquiring Trinity Ltd. Both companies are all-equity firms. Umida and Trinity have 5 million and 6 million shares outstanding respectively. Umida generates $2 million in...
-
1. A skier starts from rest at the top of each of the hills shown in Fig. 6-34. On which hill will the skier have the highest speed at the bottom if we ignore friction: (a), (b), (c), (d), or (e) c...
-
Should investors rely on EPS as an investing tool? Why or why not?
-
The following data are for Huang Wong Ping Retail Outlet Stores. The account balances (in thousands) are for 2017. 1. Compute (a) the cost of goods purchased and (b) the cost of goods sold. 2....
-
Last year (2013), Richter Condos installed a mechanized elevator for its tenants. The owner of the company, Ron Richter, recently returned from an industry equipment exhibition where he watched a...
-
A vehicle of mass m = 1500kg travels on a circular curve of radius R = 1km at a speed of v = 10m/s. There is static friction between the road and the vehicle's tires. R Road with a circular curve of...
-
Cardinal Company is considering a five-year project that would require a $2,975,000 investment in equipment with a useful life of five years and no salvage value . The company's discount rate is 14%....
-
The significance of proper experimental conduct for accurate results and conditions.
-
Which are more authoritative: decisions of the IRB or decisions of the Federal Court? Explain your answer. What are the key case law research tools available to you in Westlaw, Lexis and CanLII?...
-
A company had a broken printer which they deemed was not worth fixing and thus discarded it. The original cost of the printer was $7,500 and the accumulated depreciation at the time of disposal was...
-
write a 2-page summary of your understanding about Blockchain and its applications in different areas. include references?
-
I have a question about aviation Law The Constitution is a testament to the wisdom of those who drafted the U.S. Constitution that the document as the supreme law of the land, has been able to evolve...
-
At May 31, 2022, Coronado Inc. has $4300 in beginning raw materials, $6100 of direct labour. If manufacturing overhead was $10100, total manufacturing costs was $50000, and total raw material...
-
Using separation of variables, solve the differential equation, dy (8+z") 12 dz Use C to represent the arbitrary constant.
-
A genetically engineered strain of Escherichia coli (E. coli) is used to synthesize human insulin for people suffering from type I diabetes mellitus. In the following simplified reaction scheme,...
-
During 2012, Tom sold Sears stock for $10,000. The stock was purchased 4 years ago for $13,000. Tom also sold Ford Motor Company bonds for $35,000. The bonds were purchased 2 months ago for $30,000....
-
Sherry rents her vacation home for 6 months and lives in it for 6 months during the year. Her gross rental income during the year is $4,000. Total real estate taxes for the home are $950, and...
-
Sophie is a single taxpayer. For the first payroll period in October 2012, she is paid wages of $3,250 monthly. Sophie claims three allowances on her Form W-4. a. Use the percentage method to...
-
Using the knowledge you gained from your interview in mini case 1 , design an interface for the individual you interviewed. What interface design modifications are you making so that the program will...
-
The capital market line, CML, is the graph of the risk and return of portfolio combinations consisting of the risk-free asset and: A. Any risky portfolio. B. The market portfolio. C. The leveraged...
-
Relative to portfolios on the CML, any portfolio that plots above the CML is considered: A. Inferior. B. Inefficient. C. Unachievable.
Study smarter with the SolutionInn App