Object orienting programming

Proiect
7/10 (1 vot)
Domeniu: Calculatoare
Conține 1 fișier: docx
Pagini : 39 în total
Cuvinte : 2886
Mărime: 2.24MB (arhivat)
Publicat de: Edita S.
Puncte necesare: 7
proiectul este in engleza

Cuprins

  1. LO1.1 Programming language in OBJ 3
  2. LO1.2 ADVANTAGES OBJ ..5
  3. LO2.1 DESIGN 9
  4. 2.2 UML class diagram .10
  5. LO3.1 SOFTWARE DESIGN .11
  6. LO3.2 COMMENTS . 23
  7. LO3.2 Control Structures Statements .. .26
  8. LO4 TASK: TESTING PROGRAM 32
  9. 4.1 TEST TYPE 32
  10. 4.2 TEST PLAN 36
  11. 4.3 Personal Feedback 37
  12. 4.4 STEPS TO USE THE PROGRAM 37
  13. 4.5 Program documentation 38
  14. 5 Bibliography 39

Extras din proiect

LO1.1 Programming language in OBJ

Object Oriented Programming (POO) is a design and implementation method in which programs are represented as object collections that interact with each other through messages.

Object Oriented Programming Languages (Negrescu, 2005):

C ++

C #

Java

The main concepts behind the POO are:

-abstraction

-encapsulation

-modularity

-ranking

Abstraction is the process of grouping data and processing methods specific to solving a problem.

Abstraction:

-expresses all the essential features of an object that make it distinguishable from other objects;

-provides a precise definition of the conceptual boundaries of objects from an external perspective.

Abstraction-Example:

Abstract Data Type "Student"

typedefstruct {char name [50];

char facultatea [30];

intanStudii;

} Student;

Instance of the abstract type "Student"

Student s = {"PopescuEduard", "Informatica", 1};

ENCAPSULATION

Combining data and methods into a single data structure, defining at the same time how the object and the rest of the program can refer to the data in the object. (Deitel)

Concept defining the availability of properties and methods to an object.

It consists in separating external objects from an object that are accessible to other objects by the internal aspects of the object that are hidden to the other objects.

modularity

A way to group logically related abstractions between them.

HIERARCHY

It's an abstraction order.

The main types are:

The legacy (hierarchy of classes) relationship between classes in which one class shares the structure and behaviour of the class or classes defined in one (semantic implies a relationship of "is a").

Aggregation (hierarchy of objects) it is the relationship between two objects in which one of the objects belongs to the other object. (Semantic involves a "part of" relationship)

Principles POO:

Polymorphism

Several functions can have the same name in the same definition domain if they can difference by number or type of call arguments (http://andrei.clubcisco.ro/cursuri/2poo/co/Curs2.PDF, 2017).

A function is polymorphic if it can execute with the same effect on some values of different types (eg operator & C).

Overriding provides the possibility to redefine methods for derived classes; the methods have the same type and the same parameters.

If several functions of the same name are defined in the same domain, each call selects the correct function by comparing the types of real call arguments with the formal arguments of the function.

double abs (double);

int abs (int);

ABS (1); // call abs (int)

abs (1.0); // call abs (double)

Functions are not allowed to differ only by the type returned.

Two functions declared with the same name refer to the same function if they are in the same domain and have identical numbers and types of arguments.

Object

An object is a representation of an entity in the real world upon which an action can be taken or an action can be taken.

An object is characterized by n names n attributes (data)

-the attribute values at a given moment define a state in methods (services, operations)

Class

A class is a collection of objects with the same structure (characteristics) and the same behavior (methods or operations)

Object

-Bicycle

Bicycle Class

-frame type attribute

wheel size

number of gears

-methods

accelerate

brakes

Identifying attributes and methods

Within a bank a bank account a holder, hip, a rate of interest, number count and can perform deposit, extraction, update, hip.

Extracting attributes:

-title, balance, interest rate, countdown

-Exception of methods

- Submission, extraction, hip update

Types of abstract data and objects

Second Definition for Objects and Classes:

A class is an implementation of an abstract data type.

It defines attributes and methods implements the data structure and the abstract data type operations.

An object is an instance of an uneven one. It is uniquely determined by its name and defines a state represented by the values of its attributes at a particular moment.

The syntax of class definition

Defining a class consists of two distinct parts:

-class statement

-implementation of that class

Syntax

class IdNumeClasa {

member state statements;

statements / definitions of membership functions;

};

Bibliografie

http://andrei.clubcisco.ro/cursuri/2poo/co/Curs2.PDF. (2017). Retrieved from http://andrei.clubcisco.ro.

https://www.testing-whiz.com/blog/understanding-white-box-testing-and. (2018). Retrieved from https://www.testing-whiz.com.

Deitel, H. D. (n.d.). Java - How to program.

Grady Booch, J. R. (1999). The Unified Modeling Language.

Negrescu, L. (2005). Limbajele C si C++ pentru începatori , Vol. II,(editia XI). In L. Negrescu. Cluj-Napoca.

Preview document

Object orienting programming - Pagina 1
Object orienting programming - Pagina 2
Object orienting programming - Pagina 3
Object orienting programming - Pagina 4
Object orienting programming - Pagina 5
Object orienting programming - Pagina 6
Object orienting programming - Pagina 7
Object orienting programming - Pagina 8
Object orienting programming - Pagina 9
Object orienting programming - Pagina 10
Object orienting programming - Pagina 11
Object orienting programming - Pagina 12
Object orienting programming - Pagina 13
Object orienting programming - Pagina 14
Object orienting programming - Pagina 15
Object orienting programming - Pagina 16
Object orienting programming - Pagina 17
Object orienting programming - Pagina 18
Object orienting programming - Pagina 19
Object orienting programming - Pagina 20
Object orienting programming - Pagina 21
Object orienting programming - Pagina 22
Object orienting programming - Pagina 23
Object orienting programming - Pagina 24
Object orienting programming - Pagina 25
Object orienting programming - Pagina 26
Object orienting programming - Pagina 27
Object orienting programming - Pagina 28
Object orienting programming - Pagina 29
Object orienting programming - Pagina 30
Object orienting programming - Pagina 31
Object orienting programming - Pagina 32
Object orienting programming - Pagina 33
Object orienting programming - Pagina 34
Object orienting programming - Pagina 35
Object orienting programming - Pagina 36
Object orienting programming - Pagina 37
Object orienting programming - Pagina 38
Object orienting programming - Pagina 39
Object orienting programming - Pagina 40

Conținut arhivă zip

  • Object orienting programming.docx

Alții au mai descărcat și

Arhitectura calculatoarelor - Intel vs AMD

Rezultatele din testul 3DS Max 7 SPECapc Test Testul alaturat consta in crearea modelelor 3D, modificarea si randarea scripturilor. Conform...

Autentificarea prin semnătură digitală

Introducere O semnatura digitala reprezinta o informatie care il identifica pe expeditorul unui document. Semnatura digitala este creata prin...

Placa de Bază

Caracteristici generale ale placii de baza Placa de baza este un dizpozitiv ‘de baza’ un ‘pamânt’ pe care ‘se planteaza’ celelalte componente ....

Sistem de Prognosticare a Unei Avarii

Acest sistem calculeaza gradul de avariere a unei cladiri în cazul unui cutremur, precum si posibila necesitate a reconstructiei cladirii (partiala...

Ai nevoie de altceva?