What is the strongest valid specification for the following program? Some specifications may be equally strong....
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
What is the strongest valid specification for the following program? Some specifications may be equally strong. method DoobyDooby (x:int) returns (y:int) ensures [??] { } (a) (b) (c) var a := X; var b = 2*a; if a<0 {b:=-b; } y :=a+b; O (d) O (e) O if x<0 then y := -x else y := 3*x y == (y -x || y if x<0 then y == -x else y == == == 3*x -x || y == 3*X 3*x) && y >= 0 y == a+b && a==x && (b==2*a || b==-2*a) What is the strongest valid specification for the following program? Some specifications may be equally strong. method DoobyDooby (x:int) returns (y:int) ensures [??] { } (a) (b) (c) var a := X; var b = 2*a; if a<0 {b:=-b; } y :=a+b; O (d) O (e) O if x<0 then y := -x else y := 3*x y == (y -x || y if x<0 then y == -x else y == == == 3*x -x || y == 3*X 3*x) && y >= 0 y == a+b && a==x && (b==2*a || b==-2*a)
Expert Answer:
Related Book For
Systems analysis and design
ISBN: 978-0136089162
8th Edition
Authors: kenneth e. kendall, julie e. kendall
Posted Date:
Students also viewed these programming questions
-
In Exercises verify that the general solution satisfies the differential equation. Then find the particular solution that satisfies the initial condition(s). y = e2x/ (C + C2x) 9y" 12y + 4y = 0 y = 4...
-
a feasible study, can you provide specific examples of how theory has been or could be applied in the context of ABA professional recognition? This would help illustrate the practical application of...
-
Let Find each of the following. -2 4 and B 0 3] -6 2 4 0. 3
-
In Exercises 118, find the distance between each pair of points. If necessary, express answers in simplified radical form and then round to two decimals places. (2.6, 1.3) and (1.6, -5.7)
-
A narrow beam of sodium yellow light, with wavelength 589 nm in vacuum, is incident from air onto a smooth water surface at an angle of incidence of 35.0. Determine the angle of refraction and the...
-
Shaffner Corporation produces three products, Alpha, Beta, and Gamma. Alpha and Gamma are joint products; Beta is a by-product of Alpha. No joint cost is to be allocated to the by-product. The...
-
The distribution of the ages of the winners of the Tour de France from 1903 to 2016 is approximately bell-shaped. The mean age is 27.9 years, with a standard deviation of 3.3 years. Use the...
-
1. Assume Jennie Lin is a CPA. Evaluate her actions with respect to the rules of conduct of the AICPA. 2. Jennie believes that her actions were proper because taking the money from the church and...
-
Read the Testing the Nervous System case study . Answer each question and write a report for the case study. Which of the test results indicated a brain injury and why? Which of the test results...
-
The links of the chain are made steel that has a working stress of 300 MPa in tension. If the chain is to support the force P = 45 kN, determine the smallest safe diameter d of the links. P
-
c) Use the Principal Axes theorem to classify and graph the conic section; x + 4xy + y 9 = 0 d) Use the Principal Axes theorem to classify and graph the conic section: 2x + 4xy+2y +62x+ 22y+4=0
-
[2 2 7 16] 0 0 5 13. Observe that D is obtained from A 0 1 4 0 1 4 using two elementary row operations. Find a matrix E such that EA = D (Hint: E is the product of the two elementary matrices...
-
How do the size, technology, and mission of your organization (or college) directly affect you? Who are your organization's (or college's) competitors? (b) What changes do you see in information...
-
What distinguishes an Ubuntu approach is that, instead of assuming that greater economic growth and profitability would lead to the betterment of all, this approach allows for the possibility that a...
-
Identify and described some ways your organization ensure internal consistent and externally competitive pay systems? What recommendations would you have for your organization?
-
Assume that you were tasked with collecting data for several strategic quality initiatives. Consider the following scenarios: Requirements data for a product to be developed Test data from products...
-
Discuss the sources and value of the various forms of leverage that are used in companies. What effect can leverage have, directly or indirectly, on operational funds and ultimately on the operations?
-
A regular deposit of $100 is made at the beginning of each year for 20 years. Simple interest is calculated at i% per year for the 20 years. At the end of the 20-year period, the total interest in...
-
Define what is meant by open-ended interview questions. Give eight benefits and five drawbacks of using them.
-
Write a brief report to Sandy listing changes to the prototype prompted by Lathers reactions. In a paragraph, discuss ways that Sandy can calm Lathers fears about having the prototype taken away....
-
Interglobal Paper Company has asked for your help in comparing its present computer system with a new one its board of directors would like to see implemented. Proposed system and present system...
-
Explain the working of following drilling machines with a neat diagram: (a) General purpose drilling machine. (b) Pillar drilling machine. (c) Bench drilling machine. (d) Redial drilling machine.
-
How the size of milling machine is specified?
-
List the various drilling operations.
Study smarter with the SolutionInn App