1. Homepage
  2. Exam
  3. CSSE3100/7100 Reasoning About Programs - Semester One 2020- Final Exam - Q6 Dafny Method Signature and Specification

CSSE3100/7100 Reasoning About Programs - Semester One 2020- Final Exam - Q6 Dafny Method Signature and Specification

This question has been solved
Engage in a Conversation

QUESTION 6 CourseNana.COM

For each method described below, provide a Dafny method signature and specication. If you refer to a function or predicate (i.e., boolean function) in your specication, you must provide a full denition of the function or predicate. You do not need to include a specication of any functions or predicates you dene. CourseNana.COM

Each part of the question is worth 3 marks. CourseNana.COM

(a) A method, Count, which returns the number of occurrences of an integer, x, in an integer array. CourseNana.COM

(b) A method, MaxZeroes, which returns the longest sequence of zeroes in an integer array, e.g., for array [3, 0, 0, 9, 0, 0, 0, 2, 0], the method will return 3. CourseNana.COM

(c) A method, Trim, which modies an integer array by removing all leading zeroes, e.g., the method will change the array [0, 0, 3, 0 , 9, 0] to [3, 0, 9, 0]. CourseNana.COM

Get the Solution to This Question

WeChat WeChat
Whatsapp WhatsApp
CSSE3100代写,CSSE7100代写,Reasoning About Programs代写,Weakest Precondition Proof代写,Queensland代写,CSSE3100代编,CSSE7100代编,Reasoning About Programs代编,Weakest Precondition Proof代编,Queensland代编,CSSE3100代考,CSSE7100代考,Reasoning About Programs代考,Weakest Precondition Proof代考,Queensland代考,CSSE3100help,CSSE7100help,Reasoning About Programshelp,Weakest Precondition Proofhelp,Queenslandhelp,CSSE3100作业代写,CSSE7100作业代写,Reasoning About Programs作业代写,Weakest Precondition Proof作业代写,Queensland作业代写,CSSE3100编程代写,CSSE7100编程代写,Reasoning About Programs编程代写,Weakest Precondition Proof编程代写,Queensland编程代写,CSSE3100programming help,CSSE7100programming help,Reasoning About Programsprogramming help,Weakest Precondition Proofprogramming help,Queenslandprogramming help,CSSE3100assignment help,CSSE7100assignment help,Reasoning About Programsassignment help,Weakest Precondition Proofassignment help,Queenslandassignment help,CSSE3100solution,CSSE7100solution,Reasoning About Programssolution,Weakest Precondition Proofsolution,Queenslandsolution,