View Single Post
Old Sep 7, 2006 | 08:35 AM
  #1  
M@rshy's Avatar
M@rshy
٩(̾●̮̮̃̾•̃̾)۶
 
Joined: Aug 2004
Posts: 21,807
Likes: 0
Default Computer People v.ADTHelp

:thinking: Okay, so we were taught how to do ADT definitions, yet I'm still totally confused by it. My book doesn't describe it at all and my teacher is out of the office for today.
Does anyone here know how to describe it for me? I'm really confused on what to do.
In my homework it says:
Code:
// value of arr[2] is fetched from the array and multiplied by 3
x = arr[2] *3;
arr[2] = 3;             //3 is stored as the new value of arr[2]
So they just basically told you two ways to assign 3 to arr[2].

Then:
Give an ADT representation of an array that described two versions of the [] operator, corresponding to the fetch and store operations. Give examples using array index notation arr[i] rather than the formal function prototype for the [] operator.
Thats where I'm confused about even what they want and how to put it into ADT..
Anyone have any idea about what I'm talking about or that could help me out a little?
Reply