Handout 1.1 - Abstract Data Types.pdf

Handout 1.1 - Abstract Data Types.pdf

Info icon This preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
Kimani Njoroge [ Abstract Data Types Some authors describe objec their relationships. Within thi object-orientation and we exp detail. Handling Problems The first thing with which on you are confronted with ``rea program for the problem. How to do is to try to understand th to obtain your own abstract v abstraction and is illustrated i Figure 1.1: The model defines an abstract problem related stuff and tha include the data which are affe the operations which a by the problem. As an example consider the administration comes to you Handout 1.1 [Re-Visiting…] Abstract Data Types ct-oriented programming as programming ab is section we introduce abstract data types plore concepts used in the list example of th ne is confronted when writing programs is t al-life'' problems and you want to make life wever, real-life problems are nebulous and th he problem to separate necessary from unnec view, or model , of the problem. This process in Figure 1.1. Create a model from a problem with abstrac t view to the problem. This implies that the m at you try to define properties of the prob ected and are identified administration of employees in an institut and ask you to create a program which all Data Structures 1 bstract data types and as a basic concept for he last section in more the problem . Typically e easier by providing a he first thing you have cessary details: You try s of modeling is called ction. model focuses only on blem. These properties tion. The head of the lows to administer the
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Kimani Njoroge Handout 1.1 Data Structures 2 employees. Well, this is not very specific. For example, what employee information is needed by the administration? What tasks should be allowed? Employees are real persons who can be characterized with many properties; very few are: name, size, date of birth, shape, social number, room number, hair colour, hobbies. Certainly not all of these properties are necessary to solve the administration problem. Only some of them are problem specific . Consequently you create a model of an employee for the problem. This model only implies properties which are needed to fulfill the requirements of the administration, for instance name, date of birth and social number. These properties are called the data of the (employee) model. Now you have described real persons with help of an abstract employee. Of course, the pure description is not enough. There must be some operations defined with which the administration is able to handle the abstract employees. For example, there must be an operation which allows you to create a new employee once a new person enters the institution. Consequently, you have to identify the operations which should be able to be performed on an abstract employee. You also decide to allow access to the employees' data only with associated operations. This allows you to ensure that data elements are always in a proper state. For example you are able to check if a provided date is valid.
Image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern