Зарегистрироваться
Восстановить пароль
FAQ по входу

Lafore R. Waite Group's Object-Oriented Programming in C++

  • Файл формата rar
  • размером 2,85 МБ
  • содержит документ формата chm
  • Добавлен пользователем , дата добавления неизвестна
  • Описание отредактировано
Macmillan Computer Publishing, 1998
Characteristics of Object-Oriented Languages
Let’s briefly examine a few of the major elements of object-oriented languages in general, and C++ in particular.
When you approach a programming problem in an object-oriented language, you no longer ask how the problem will be divided into functions, but how it will be divided into objects. Thinking in terms of objects, rather than functions, has a surprisingly helpful effect on how easily programs can be designed. This results from the close match between objects in the programming sense and objects in the real world. This process is described in detail in Chapter 16, Object-Oriented Design.
What kinds of things become objects in object-oriented programs? The answer to this is limited only by your imagination, but here are some typical categories to start you thinking:
Physical objects
Automobiles in a traffic-flow simulation
Electrical components in a circuit-design program
Countries in an economics model
Aircraft in an air-traffic-control system
Elements of the computer-user environment
Windows
Menus
Graphics objects (lines, rectangles, circles)
The mouse, keyboard, disk drives, printer
Data-storage constructs
Customized arrays
Stacks
Linked lists
Binary trees
Human entities
Employees
Students
Customers
Salespeople
Collections of data
An inventory
A personnel file
A dictionary
A table of the latitudes and longitudes of world cities
User-defined data types
Time
Angles
Complex numbers
Points on the plane
Components in computer games
Cars in an auto race
Positions in a board game (chess, checkers)
Animals in an ecological simulation
Opponents and friends in adventure games
The match between programming objects and real-world objects is the happy result of combining data and functions: The resulting objects offer a revolution in program design. No such close match between programming constructs and the items being modeled exists in a procedural language.
  • Чтобы скачать этот файл зарегистрируйтесь и/или войдите на сайт используя форму сверху.
  • Регистрация