Problem 2 [20 marks] Develop a specification for two data types a. [10 marks] A
ID: 3916107 • Letter: P
Question
Problem 2 [20 marks] Develop a specification for two data types a. [10 marks] A string of ASCII characters. b. [10 marks] A coordinate in 3-dimensional space (x.y,z). For each case, list data (properties) and operations (functions) that will be relevant to the data type. Separate those data and operations which define the data type from those which don't. E.g. For the Stack data type, it is defined by: .a sequence of data push(x) add an item pop remove an item in LIFO order, behaviour is undefined if stack empty · isEmpty()-returns true iff stack contains 0 elements Some of the extra data and operations might be: the length of the stack (number of items) size returns current length * top) - probe the topmost itemExplanation / Answer
Q1) Develop a specification for:-
a) A String of ASCII character:-
b) A coordinate in 3-Dimensional Space (x,y,z):-
Please let me know in case of any clarifications required. Thanks!
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.