Студопедия

КАТЕГОРИИ:

АвтомобилиАстрономияБиологияГеографияДом и садДругие языкиДругоеИнформатикаИсторияКультураЛитератураЛогикаМатематикаМедицинаМеталлургияМеханикаОбразованиеОхрана трудаПедагогикаПолитикаПравоПсихологияРелигияРиторикаСоциологияСпортСтроительствоТехнологияТуризмФизикаФилософияФинансыХимияЧерчениеЭкологияЭкономикаЭлектроника



Lexical structure of the program




Читайте также:
  1. DESIGNING AN INTERNATIONAL MARKETING PROGRAM
  2. How to structure your business
  3. I. How have family structures, practices, values, and responsibilities changed since the 1950s?
  4. Lab expands health program
  5. Lecture 6 The principles of lexical nomination: classification and analysis
  6. LEXICAL MEANING AND SEMANTIC STRUCTURE OF ENGLISH WORDS
  7. LEXICAL VARIANTS AND PARONYMS
  8. OBJECT-ORIENTED PROGRAMMING
  9. ORGANIZATIONAL STRUCTURE OF THE FEDERAL RESERVE SYSTEM

Program construction consideration principles

 

There are two program construction consideration principles:

 

- encapsulation,

 

- multilevel representation.

 

The process of shell creating around substances is called encapsulation. The shell is called the capsule. Encapsulated substances are characterized by high internal and low external coupling.


Program encapsulation

 

Using capsule allows to achieve the following purposes:

- to consider program capsules as complete parts;

- to manipulate program capsules while the program is being written, debugged and read;

- to indicate the capsule usage method;

- to indicate the capsule processing values;

- to limit access to capsule parts;

- to hide implementation of the capsule parts;

- to use capsules inside other capsules.


Multilevel representation

 

Because of abstraction using in software engineering representation levels of software exist and are widely used.

These levels correspond to appropriate phases of software life cycle or reflect different views on it.


Encapsulation levels

 

 

There are six types of encapsulation levels:

- lexical level,

- statement level,

- subroutine level,

- module level,

- class level,

- megamodule level.

 


Encapsulation levels

 

On the lexical level, alphabet characters are encapsulated. Capsule is called the lexeme.

 

On the statement level lexemes and expressions are encapsulated. Capsule is called the structural statement.

 

On the subroutine level, statements are encapsulated. Capsules are called subroutines, macros, procedures and functions.

 


Encapsulation levels

 

On the module level, types and subroutines are encapsulated. capsules are called modules or packages. They use information hiding and separate compilation.

 

On the class level, types and subroutines are encapsulated. The capsules are called classes. They use inheriting and polymorphism concepts.

On the megamodule level, knowledge and behavior are encapsulated. The capsule is an association of modules and classes. It is called megamodule.




Lexical level

 

The lexical level is the first encapsulation level. It is the simplest level and the background for another encapsulation level.

 

There are two basic constructions on the lexical level: characters and lexeme.


Lexeme

 

The lexeme is capsule witch encapsulates the alphabet characters.

The lexeme is a design, which is limited by special characters or other lexeme.


Lexical structure of the program

 

On the lexical level, the program text consists of the following designs:

- Blank characters;

- comment statements;

- Lexemes (denotations).

 

Blank characters are used for separating lexemes and improving program understanding.

The comment statements are the chains, explaining descriptions in a program text.


Дата добавления: 2015-09-13; просмотров: 6; Нарушение авторских прав





lektsii.com - Лекции.Ком - 2014-2020 год. (0.008 сек.) Все материалы представленные на сайте исключительно с целью ознакомления читателями и не преследуют коммерческих целей или нарушение авторских прав
Главная страница Случайная страница Контакты